SUNY Geneseo Department of Mathematics
Wednesday, April 22
Math 230 02
Spring 2015
Prof. Doug Baldwin
celldisp
function to display elementscellplot
draws diagram>> V = [ 'hello' 'cat' ]
V =
hellocat
>> V2 = { 'hello' 'cat' }
V2 =
'hello' 'cat'
>> W(1) = 'hello'
{Subscripted assignment dimension mismatch.}
>> S = 'hello'
S =
hello
>> V2{3} = 'aardvark'
V2 =
'hello' 'cat' 'aardvark'
>> size(V2)
ans =
1 3
>> V2(4) = 'wombat'
{Conversion to cell from char is not possible.}
>> prices = { 'computer' 500; 'water' 1.95 }
prices =
'computer' [ 500]
'water' [1.9500]
>> prices{1,2}
ans =
500
>> prices(1,2)
ans =
[500]
>> class( prices{1,2} )
ans =
double
>> class( prices(1,2) )
ans =
cell
>> size( prices(1,2) )
ans =
1 1
>> prices(3,:) = { 'music' [0.99 1.29] }
>> prices =
'computer' [ 500]
'water' [ 1.9500]
'music' [1x2 double]
>> prices{3,2}(1)
ans =
0.9900