Você está na página 1de 1

>> cell_test

27-Nov-2012 11:57:27
CELL_TEST:
MATLAB version
Test the CELL library.
CELL_TEST01
Use a cell array (vector of vectors) to store rows 3:7
of Pascal's triangle.
The row sizes:
1:
2:
3:
4:
5:

4
5
6
7
8

The storage for the cell array is 30


The row offsets:
1:
2:
3:
4:
5:
6:

0
4
9
15
22
30

Rows 3:7 of Pascal's Triangle:


1
1
1

3
4
5

3
6
10

1
4
10

1
5

15

20

15

35

35

1
1

6
6

7
21

21
7

A(3,4) = 10
A(4,*):
1
6

6
1

Retrieve an arbitrary list of items:


A(1,2)
A(2,3)
A(5,4)
A(5,8)

=
=
=
=

3
6
35
1

CELL_TEST:
Normal end of execution.
27-Nov-2012 11:57:27
>>

15

20

15

Você também pode gostar