フィルターのクリア

How to split and replace value of cell array ?

1 回表示 (過去 30 日間)
tedy
tedy 2013 年 4 月 10 日
Hello,
i have a cell array 36x39 cell, and i have a function named 'new', i wanna split the cell_array into two cell_array_1 36x27 and cell_array_2 36x12. also i count both of cell array with 'new' function, so i can get the new value on each row col of cell array. how can i split and replace the cell array with 'new' function ? i code it, but it still doesn't work well
t=[];
for i=1:39
for j=1:36
t=[t cell_array{j,i}];
end
end
t;
it can't replace the cell_array, please help me. Thanks in advance
  1 件のコメント
Jan
Jan 2013 年 4 月 10 日
I do not understand what you 2count both of cell array". What do you want to "replace"?

サインインしてコメントする。

採用された回答

Iman Ansari
Iman Ansari 2013 年 4 月 10 日
This code may help you:
cell_array_1=cell_array(:,1:27);
cell_array_2=cell_array(:,28:39);
for i=1:39
for j=1:36
cell_array{j,i}=[j i];
end
end
  12 件のコメント
tedy
tedy 2013 年 4 月 10 日
yes! Thanks brother
Cedric
Cedric 2013 年 4 月 10 日
Don't forget to [ Accept the Answer ] if Iman solved your problem.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by