SUNY Geneseo Department of Mathematics
Friday, November 21
Math 230 01
Fall 2014
Prof. Doug Baldwin
>> numbers(1) = 2;
>> reasons(1) = 'even prime';
{Subscripted assignment dimension mismatch.
}
>> reasons(1,:) = 'even prime';
>> reasons
reasons =
even prime
>> numbers(2) = 1;
>> reasons(2,:) = 'multiplicative identity'
{Subscripted assignment dimension mismatch.
}
>> size( reasons )
ans =
1 10
>> clear
>> numbers = { 2, 'even prime' }
numbers =
[2] 'even prime'
>> % second row of numbers gets { 1, 'mult. id.' }
>> numbers(2,:) = { 1, 'multiplicative identity' }
numbers =
[2] 'even prime'
[1] 'multiplicative id...'
>> numbers{1,2}
ans =
even prime
>> numbers(1,2)
ans =
'even prime'
>> class( numbers(1,2) )
ans =
cell
>> class( numbers{1,2} )
ans =
char
save
and load
commands do this>> save NumberInfo numbers
>> clear
>> clc
>> load NumberInfo
>> numbers
numbers =
[2] 'even prime'
[1] 'multiplicative i...'