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
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일
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