cell output of function

2 views (last 30 days)
Thor
Thor on 19 Apr 2014
Commented: Thor on 19 Apr 2014
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 Comments
Thor
Thor on 19 Apr 2014
I feel like it should be something i could do in a single line :)

Sign in to comment.

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 19 Apr 2014
D=cell2mat(fDurations(I));

More Answers (0)

Tags

Products

Community Treasure Hunt

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

Start Hunting!