Skip to content

Commit

Permalink
markdown source builds
Browse files Browse the repository at this point in the history
Auto-generated via `{sandpaper}`
Source  : 00c300e
Branch  : main
Author  : Chris Fullerton <[email protected]>
Time    : 2024-11-18 15:35:45 +0000
Message : Merge pull request #64 from UoMResearchIT/feat/rem-true-false-challenge

remove true & false challenge
  • Loading branch information
actions-user committed Nov 18, 2024
1 parent 89808eb commit 3e409a4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 56 deletions.
55 changes: 0 additions & 55 deletions 06-cond.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,61 +173,6 @@ at least one part is true

::::::::::::::::::::::::::::::::::::::: challenge

## True and False Statements

The operations we tested above evaluate to a logical value:
`true` or `false`.
However these numerical comparison tests aren't the only values
which are `true` or `false` in MATLAB.
For example, `1` is considered `true` and `0` is considered `false`.
In fact, *any* value can be used in a conditional statement.

Run the code below in order to discover
which values are considered `true` and which are
considered `false`.

```matlab
if ''
disp('empty string is true')
else
disp('empty string is false')
end
if 'foo'
disp('non empty string is true')
else
disp('non empty string is false')
end
if []
disp('empty array is true')
else
disp('empty array is false')
end
if [22.5, 1.0]
disp('non empty array is true')
else
disp('non empty array is false')
end
if [0, 0]
disp('array of zeros is true')
else
disp('array of zeros is false')
end
if true
disp('true is true')
else
disp('true is false')
end
```

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

::::::::::::::::::::::::::::::::::::::: challenge

## Close Enough

Write a script called `near` that performs a test on two variables, and displays `1`
Expand Down
2 changes: 1 addition & 1 deletion md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"episodes/03-loading_data.md" "4c829cdd125f6cc12b240a2f4c930b85" "site/built/03-loading_data.md" "2023-12-08"
"episodes/04-plotting.md" "686b418946e7b164a392c060ad096705" "site/built/04-plotting.md" "2024-03-22"
"episodes/05-scripts.md" "56258cbb1e04bde1d86d974fa3f20e7c" "site/built/05-scripts.md" "2023-12-08"
"episodes/06-cond.md" "c8e7b50395e7d26ede321c9a23284726" "site/built/06-cond.md" "2023-12-04"
"episodes/06-cond.md" "14fb6065021801b345e5f47cc929658b" "site/built/06-cond.md" "2024-11-18"
"episodes/07-func.md" "950fb0b2819db046b3b546555c1813f7" "site/built/07-func.md" "2024-11-18"
"episodes/08-loops.md" "e00de44cbbcc50ab075fcb51f337953a" "site/built/08-loops.md" "2023-12-04"
"instructors/instructor-notes.md" "95bc9dd61103b3d6345f9d96dce4538b" "site/built/instructor-notes.md" "2023-10-18"
Expand Down

0 comments on commit 3e409a4

Please sign in to comment.