Nick Myers
2022-11-30
Everything should work
=
function
…for
loop (repeating things)true(), false()
and if
statement (doing things only in certain conditions)cell
arrays (using more than numbers)>> a = 10 % stores the number 10 in a variable called "a"
>> b = 2+2 % stores the result of 2+2 in "b"
writing repeated operations can become tedious (and error-prone!):
instead:
Find where the array fulfills certain rules. (true
, false
)
Matlab thinks of logical (true
/false
) statements in terms of binary numbers
true = 1
false = 0
what about finding exact matches?
execute code only if a particular condition is met
So far we have seen numeric data types (and booleans):
Matlab also deals with text:
text and numbers dont mix easily