diff --git a/06-cond.md b/06-cond.md index a3aab50..3c70f2b 100644 --- a/06-cond.md +++ b/06-cond.md @@ -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` diff --git a/md5sum.txt b/md5sum.txt index 7217342..938dec9 100644 --- a/md5sum.txt +++ b/md5sum.txt @@ -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"