assigning an empty numeric value to a cell array

Hi, I need to be able to assign an empty numeric value to a cell array, as in
Cell = {};
Cell = [ Cell , [] ];
But this returns
Cell =
{}
I specifically need the first element of Cell to have class numeric, and be empty.
Must be possible, but ...
thanks for any suggestions!

 채택된 답변

Guillaume
Guillaume 2014년 11월 17일

2 개 추천

>>c = {[]};
>>class(c{1})
ans = double
>>isempty(c{1})
ans = 1
Or if you really want to be specific:
c = {double.empty(0)};

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

태그

질문:

2014년 11월 17일

답변:

2014년 11월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by