I have a function that returns a cell, but i only need what is stored in that cell saved to D. Is there a nice way of doing this ?
An ugly solution would be:
D = fDurations(I);
D = D{1};
Could i do this in a single line ?

2 件のコメント

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 4 月 19 日
Why is this ugly?
Thor
Thor 2014 年 4 月 19 日
I feel like it should be something i could do in a single line :)

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

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 4 月 19 日

0 投票

D=cell2mat(fDurations(I));

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with MATLAB についてさらに検索

製品

タグ

質問済み:

2014 年 4 月 19 日

コメント済み:

2014 年 4 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by