From a97c82c868d1b29490cc8586be8726dfd0eb481a Mon Sep 17 00:00:00 2001 From: Warrick Ball Date: Tue, 14 Nov 2023 10:57:37 +0000 Subject: [PATCH] Fix MATLAB syntax blocks in 'Testing a function' --- episodes/07-func.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/episodes/07-func.md b/episodes/07-func.md index 60bba6f6..79571215 100644 --- a/episodes/07-func.md +++ b/episodes/07-func.md @@ -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. @@ -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} -```` :::::::::::::::::::::::::