how to combine a set of data into one cell

1 回表示 (過去 30 日間)
andrew
andrew 2013 年 7 月 17 日
I currently have a matrix 1x361 each column is an 11x2 matrix. How can I print the 11x2 matrix into one cell.
for example:
within matrix desired output
1 2 ===> (1,2)
3 4 ===> (3,4)
5 6 ===> (4,5)
i have the following code for one 11x2 matrix how do i do it for all:
A = percent;
A = num2cell(A);
for i=1:size(A,1)
A{i,1} = [num2str(A{i,1}),', ',num2str(A{i,2})];
A{i,2}=[];
A;
end
% =

回答 (1 件)

Andrei Bobrov
Andrei Bobrov 2013 年 7 月 17 日
num2cell(A,2)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by