フィルターのクリア

how to fill cell array with a data file?

2 ビュー (過去 30 日間)
tevzia
tevzia 2013 年 11 月 5 日
コメント済み: Image Analyst 2013 年 11 月 5 日
Hi, I want to create cell array like edge={} (3x947) but i dont want to use edge=cell(3,947) -because next function that i will use need to be {}. i create
x{3,947}={};
y=x';
a=load('weight.dat');
y=a;
how could i add data file in this cell array. or convert it cell array? I want tit to show in command window like this;
y =
[0.9] [0.8] [0.05]
[0.1] [0.2] [1.01]
[0.2] [0.7] [1.32]
[0.5] [0.4] [0.48]
[0.5] [0.6] [0.76]...
Can you help me to find out how to do that?
Thanks

採用された回答

Image Analyst
Image Analyst 2013 年 11 月 5 日
Why do you want a cell array when y, the regular old numerical array, is so much simpler?
  2 件のコメント
tevzia
tevzia 2013 年 11 月 5 日
because next function that i am going to use is need that type of cell array
Image Analyst
Image Analyst 2013 年 11 月 5 日
You could do a loop over all cells
for col = 1 : size(y, 2)
for row = 1 : size(y, 1)
y{row, col} = a(row, col);
end
end

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAdding custom doc についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by