how to display data from a cell?

I created a cell {{{1,2,3},{4}}, {{1,2},{3,4}}} it has two partitions in it or may be more. What i want in my output is that answer should be in the form {{1,2,3},{4}} i.e a partition which satisfy certain conditions. But my answer is like this ans =
[1x3 double] [4]

5 件のコメント

KSSV
KSSV 2018 年 8 月 13 日
Have a look on celldisp.
Rik
Rik 2018 年 8 月 13 日
Do you mean you want the command window to literally show {{1,2,3},{4}}?
Also, what code are you using, because for your example I get {1×3 cell} {1×1 cell} in my command window.
Stephen23
Stephen23 2018 年 8 月 13 日
編集済み: Stephen23 2018 年 8 月 13 日
I doubt that {{1,2,3},{4}} would result in this: [1x3 double] [4], because you have not actually defined any 1x3 double. Please show us your actual code and variables, not several different conflicting ones.
asim nadeem
asim nadeem 2018 年 8 月 13 日
編集済み: asim nadeem 2018 年 8 月 13 日
i checked all the partitions one by one and if they justify the condition i want to see literally {1,2,3},{4} so i got 4 answers out of 7. ans =
[1x3 double] [4]
ans =
[1x3 double] [3]
ans =
[1x3 double] [2]
ans =
[1] [1x3 double]
asim nadeem
asim nadeem 2018 年 8 月 13 日
編集済み: asim nadeem 2018 年 8 月 13 日
for i= 1:totoal no of partitions
d = C{i};% ith partition
%conditions applied
%say C{1},C{2} are answers
C{i,:}% output

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

回答 (0 件)

カテゴリ

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

タグ

質問済み:

2018 年 8 月 13 日

編集済み:

2018 年 8 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by