matlab-novice-inflammation
matlab-novice-inflammation copied to clipboard
Fix MATLAB syntax blocks in 'Testing a function'
I found two solutions under Testing a function that were being rendered as:
```
function out = normalise(in)
%NORMALISE Return original array, normalised so that the
% new values lie in the range 0 to 1.
H = max(max(in));
L = min(min(in));
out = (in-L)/(H-L);
end
```
{: .language-matlab}
and
```
a = linspace(1, 10); % Create evenly-spaced vector
norm_a = normalise(a); % Normalise vector
plot(a, norm_a) % Visually check normalisation
```
{: .language-matlab}
I suspect these are from the old style (pre-Workbench) lessons, so I mimicked the syntax used elsewhere for MATLABL function blocks, i.e.
```matlab
% code here
```
:ok: Pre-flight checks passed :smiley:
This pull request has been checked and contains no modified workflow files, spoofing, or invalid commits.
It should be safe to Approve and Run the workflows that need maintainer approval.