cell output of function

1 次查看(过去 30 天)
Thor
Thor 2014-4-19
评论: Thor 2014-4-19
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 个评论
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
D=cell2mat(fDurations(I));

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by