SUNY Geneseo Department of Computer Science
Friday, April 18
CSci 120, Spring 2014
Prof. Doug Baldwin
How to save database?
save
command, exactly complementary to loading with load
>> load database
>> save newdatabase
Downloading database.mat file: if your browser tries to open the file instead of download it when you click on the link, try right-clicking and using “Download Link” command in resulting menu
In cell arrays, “tuple” = row
Cells vs content
>> c = { 'Isaac Newton' 1666 }
c =
'Isaac Newton' [1666]
>> c{2}
ans =
1666
>> c(2)
ans =
[1666]
>> date = c{2}
date =
1666
>> datecell = c(2)
datecell =
[1666]
>> datecell + 3
Undefined function 'plus' for input arguments of type 'cell'.
>> datecell{1} + 3
ans =
1669
cellplot
command can also be used to display the structure of a cell array through Matlab: