Skip to content

Commit

Permalink
markdown source builds
Browse files Browse the repository at this point in the history
Auto-generated via `{sandpaper}`
Source  : a50187d
Branch  : main
Author  : Dan Cummins <[email protected]>
Time    : 2025-01-08 10:43:50 +0000
Message : Merge pull request #264 from dc2917/typo_fixes

Typo fixes
  • Loading branch information
actions-user committed Jan 8, 2025
1 parent 3d130ce commit 9ea6c63
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion 02-arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ last three characters: gen
'gen'
element(1:2:end) % Select every other element starting at first
ans =
'oye
'oye'
element(2:end-1) % Select elements starting with 2nd, until last-but-one
ans =
'xyge'
Expand Down
2 changes: 1 addition & 1 deletion 03-plotting.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ Hint: search the documentation for *standard deviation*
::::::::::::::::::::::::::::::::::::::::::::::::::

It is often convenient to combine multiple plots into one figure
using the `subplot`command which plots our graphs in a grid pattern.
using the `subplot` command which plots our graphs in a grid pattern.
The first two parameters describe the grid we want to use, while the third
parameter indicates the placement on the grid.

Expand Down
2 changes: 1 addition & 1 deletion 04-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ is just a text file with a `.m` extension. We've written
commands to load data from a `.csv` file and
display some plots of statistics about that data. Let's
put those commands in a script called `plot_patient1.m`,
which we'll save in our current directory,`matlab-novice-inflammation`.
which we'll save in our current directory, `matlab-novice-inflammation`.

To create a new script in the current directory, we use

Expand Down
4 changes: 2 additions & 2 deletions 05-loops.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ aluminum
```matlab
% spell a string adding one letter at a time using a loop
word = 'aluminium';
word = 'aluminum';
for letter = 1:length(word)
disp(word(1:letter))
Expand Down Expand Up @@ -386,7 +386,7 @@ a
```matlab
% Spell a string in reverse using a loop
word = 'aluminium';
word = 'aluminum';
for letter = length(word):-1:1
disp(word(letter))
Expand Down
4 changes: 2 additions & 2 deletions 06-cond.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ disp(['sum of negative values: ', num2str(neg_total)])
```

```output
sum of positive values: 26
sum of positive values: 20
sum of negative values: -6
```

Expand Down Expand Up @@ -378,7 +378,7 @@ for i = 1:length(files)
img_name = replace(file_name, '.csv', '.png');
% Generate path to data file and image file
file_name = fullfile('data', filename);
file_name = fullfile('data', file_name);
img_name = fullfile('results', img_name);
patient_data = readmatrix(file_name);
Expand Down
12 changes: 8 additions & 4 deletions 08-defensive.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ The three preconditions catch invalid inputs:
```

```error
Error using normalize_rectangle (line 6)
Error using normalize_rectangle (line 7)
Rectangle must contain 4 coordinates
```

Expand Down Expand Up @@ -177,7 +177,7 @@ the assertion is triggered:
error: Calculated upper X coordinate invalid
```

Re-reading our function, we realize that line 19 should
Re-reading our function, we realize that line 21 should
divide `dy` by `dx`. If we had left out the assertion
at the end of the function, we would have created and
returned something that had the right shape as
Expand Down Expand Up @@ -294,7 +294,7 @@ test_range_overlap
```error
Undefined function or variable 'range_overlap'.
Error in test_range_overlap (line 6)
Error in test_range_overlap (line 5)
assert(isequal(range_overlap([0, 1.0]),[0, 1.0]))
```

Expand All @@ -321,6 +321,7 @@ function varlist(varargin)
fprintf('Number of arguments: %d\n',nargin)
celldisp(varargin)
end
```

```matlab
Expand Down Expand Up @@ -378,6 +379,7 @@ function overlap = range_overlap(________)
end
overlap = [lowest, highest];
end
```

::::::::::::::: solution
Expand All @@ -402,6 +404,7 @@ function overlap = range_overlap(varargin)
end
overlap = [lowest, highest];
end
```

:::::::::::::::::::::::::
Expand Down Expand Up @@ -462,12 +465,13 @@ function overlap = range_overlap(varargin)
% Catch non-overlapping ranges
if low >= highest || high<=lowest
output_range = NaN;
overlap = NaN;
return
end
end
overlap = [lowest, highest];
end
```

:::::::::::::::::::::::::
Expand Down
12 changes: 6 additions & 6 deletions md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"config.yaml" "ab22e2bf5a5cd3a2bd65498a7ca6a898" "site/built/config.yaml" "2023-04-26"
"index.md" "8f1498ab2efb0d63a9b7a95bf33510dd" "site/built/index.md" "2023-04-26"
"episodes/01-intro.md" "1d2ac5ffc776e9e9eaf062e8dbf015fa" "site/built/01-intro.md" "2023-04-26"
"episodes/02-arrays.md" "d6242c23a3d07c947f9cfc0111c0e4ac" "site/built/02-arrays.md" "2023-04-26"
"episodes/03-plotting.md" "438d2a773392adfd2fde63e178f4fb83" "site/built/03-plotting.md" "2023-04-26"
"episodes/04-scripts.md" "d928cc345f515680e04f9d25cc2f2cec" "site/built/04-scripts.md" "2023-04-26"
"episodes/05-loops.md" "88c1b90d65bbeb46692922b805d4a251" "site/built/05-loops.md" "2023-04-26"
"episodes/06-cond.md" "f276db74c3dfdc7bfe19475d917d227d" "site/built/06-cond.md" "2023-04-26"
"episodes/02-arrays.md" "358c92e1971b0415b511b49db391b72f" "site/built/02-arrays.md" "2025-01-08"
"episodes/03-plotting.md" "19546dbd8aa19d7ba37177b0cbe05430" "site/built/03-plotting.md" "2025-01-08"
"episodes/04-scripts.md" "aa8e01310829456ef15a2e100c181f68" "site/built/04-scripts.md" "2025-01-08"
"episodes/05-loops.md" "1b07298cd425a9f14a44c34a4881d3ab" "site/built/05-loops.md" "2025-01-08"
"episodes/06-cond.md" "b6dcd573cfdac601fbc798d31e2395c6" "site/built/06-cond.md" "2025-01-08"
"episodes/07-func.md" "d97fe1f1091b1c4a49c9bcb39a4d0b57" "site/built/07-func.md" "2025-01-07"
"episodes/08-defensive.md" "0f8afd21566dcf43343fa09af7590f6a" "site/built/08-defensive.md" "2023-04-26"
"episodes/08-defensive.md" "42008b6a807d20022eb6fcde361473ba" "site/built/08-defensive.md" "2025-01-08"
"instructors/instructor-notes.md" "65e75f30364d641c7728dae2adbd85d2" "site/built/instructor-notes.md" "2023-04-26"
"learners/discuss.md" "e7d00cb8aa5e7de1aaaa659777dad8d4" "site/built/discuss.md" "2023-04-26"
"learners/reference.md" "c7f26691fa869c23d957a9f7b3bf9796" "site/built/reference.md" "2023-04-26"
Expand Down

0 comments on commit 9ea6c63

Please sign in to comment.