Skip to content

Commit

Permalink
Fix MATLAB syntax blocks in 'Testing a function'
Browse files Browse the repository at this point in the history
  • Loading branch information
warrickball authored Nov 14, 2023
1 parent 72aecd4 commit a97c82c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions episodes/07-func.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,7 @@ DATA centered around the value.
## Solution

1.
````
```
```matlab
function out = normalise(in)
%NORMALISE Return original array, normalised so that the
% new values lie in the range 0 to 1.
Expand All @@ -439,18 +438,13 @@ function out = normalise(in)
out = (in-L)/(H-L);
end
```
{: .language-matlab}
````

2.
````
```
```matlab
a = linspace(1, 10); % Create evenly-spaced vector
norm_a = normalise(a); % Normalise vector
plot(a, norm_a) % Visually check normalisation
```
{: .language-matlab}
````

:::::::::::::::::::::::::

Expand Down

0 comments on commit a97c82c

Please sign in to comment.