MatLab Variables
MatLab has variables and assignment:
>> evens = 2.*(1:8)
evens =
2 4 6 8 10 12 14 16
To suppress output, terminate line with a semicolon (not to be confused with vertical concatenation operator)
>> odds = evens - 1;
>>
To see the value of variable v, just enter expression v:
>> odds
odds =
1 3 5 7 9 11 13 15
Previous slide
Next slide
Back to first slide
View graphic version