how to view contents of cell arrays of different size

Hi All,
I am trying to view the contents of the cells in a cell(z1)/table that I have made which has is 1by4 in size:
z1 =
[7173x1 double] [6974x1 double] [7042x1 double] [7040x1 double]
I have used z1{:}, only opens up the last column [7040*1] and cellfun(@(a)disp(a), z1); does the same as z1{:}.
Is there a way to have all four elements in z1 displayed?
Thanks for reading

回答 (2 件)

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 7 月 9 日

0 投票

celldisp(z1)

1 件のコメント

Matthew
Matthew 2014 年 7 月 9 日
Hi , I used the command you mentioned but this won't open up in the object browser screen i still see the same size dimensions in each cell, do you know if there is a way to open each element in z1 without double clicking on the cells

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

José-Luis
José-Luis 2014 年 7 月 9 日
編集済み: José-Luis 2014 年 7 月 9 日

0 投票

I am afraid it is not going to happen automagically, or without delving into the guts of the IDE. You could save every cell to a new variable:
test = [{rand(10)} {rand(10)} {rand(10)} {rand(10)}]
[a,b,c,d] = test{:}
Then just click on a,b,c, and d. You could even create dynamic names for every variable. However, I strongly recommend against that. You are probably better-off clicking.
If you think this should be a feature, you could always contact the Mathworks.
EDIT
Alternatively, you could pad your arrays to make them all the same size, transform your cell into a numerical matrix, cell2mat(), and look at everything at the same time then.

カテゴリ

ヘルプ センター および File ExchangeCell Arrays についてさらに検索

質問済み:

2014 年 7 月 9 日

編集済み:

2014 年 7 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by