Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MATLAB syntax blocks in 'Testing a function' #257

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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