SUNY Geneseo Department of Computer Science


Cell Arrays, Day 3

Friday, April 25

CSci 120, Spring 2014
Prof. Doug Baldwin

Return to List of Lectures

Previous Lecture

Misc

Exams are graded

Final exam

SOFIs

Math study abroad panel

Questions?

Quiz

Example solutions

>> x = {1}        % Store a cell array containing the number 1 in x
x = 
    [1]
>> x = (1)        % Store the number 1 in x (harmless but unnecessary parentheses)
x =
     1
>> x = [1]        % Also store 1 in x (as a 1-by-1 matrix, same as scalar to Matlab)
x =
     1
>> c = { 1 'hello' 2 }
c = 
    [1]    'hello'    [2]
>> c{1}          % Get the contents of the 1st cell in c
ans =
     1
>> c(1)          % Get the 1st cell in c
ans = 
    [1]

Cell Arrays

Comparing values in relational database application of cell arrays

Next

More cell arrays and relational databases

Handout


Next Lecture