SUNY Geneseo Department of Mathematics
Wednesday, September 3
Math 230 01
Fall 2014
Prof. Doug Baldwin
x = y + 1
in Matlab means to fetch a value from y, calculate
with it, and put a value into x, it doesn’t describe a permanent
relationship between x and y3 + 8
makes sense because addition “works” on numbers3 + “good morning”
doesn’t, because addition doesn’t
work on phrases>> x = 1
x =
1
>> whos
Name Size Bytes Class Attributes
x 1x1 8 double
>> y = int32(x)
y =
1
>> whos
Name Size Bytes Class Attributes
x 1x1 8 double
y 1x1 4 int32
>> y / 2
ans =
1
>> x / 2
ans =
0.5000
>> phrase = 'good morning'
phrase =
good morning
>> whos
Name Size Bytes Class Attributes
ans 1x1 8 double
phrase 1x12 24 char
x 1x1 8 double
y 1x1 4 int32