是这个意思吗?
>> A=magic(3)
A =
8 1 6
3 5 7
4 9 2
>> B=num2cell(A)
B =
[8] [1] [6]
[3] [5] [7]
[4] [9] [2]
>> whos
Name Size Bytes Class Attributes
A 3x3 72 double
B 3x3 612 cell
答案如下所示:
>> A=magic(3):
A =
8 1 6;
3 5 7;
4 9 2。
>> B=num2cell(A):
B =
[8] [1] [6];
[3] [5] [7];
[4] [9] [2]。
>> whos:
Name Size Bytes Class Attributes;
A 3x3 72 double ;
B 3x3 612 cell。