Cells Flashcards

1
Q

What can cells stores

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

2 methods to create a cell

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly