Cells Flashcards
What can cells stores
Individual cell locations can stores different types of variables
Eg: cell{1} can store matrix
Cell{2} can store string
Cell{3} can stores array
Etc
How to access different locations in a cell
What does this do, what value is returned
What if another method is used
What happens to the value returned
A location in a cell can be accessed by keying in the coordinates of the location in a curly bracket
Eg:
In a 2 by 3 cell matrix, to access location row 1 column 3,
X{1,3}
This sends the address of the location to access
If the location coordinates are placed in parenthesis, the function returns a pointer instead
Eg: X(1,3)
Values returned by the function will not be the actual values of the location
2 methods to create a cell
1: x = cell(size)
Eg: x = cell(2,3); 2 row 3 column cell matrix
Creates a cell with an identified number of cell locations
Can create matrix like cells
2: cell{1}=value; cell{2}= value; etc
Creates cells dynamically but dimension of cell is in form of array