getting cell contents reference from non cell object error for following code
조회 수: 1 (최근 30일)
이전 댓글 표시
if (length(A) < sArea || length(B) < sArea) || ncut > sNcut
Seg{1} = Seg{i}; %#ok<NASGU>
Id{1} = id; %#ok<NASGU> % for debugging
Ncut{1} = ncut; %#ok<NASGU> % for duebugging
return;
end
getting error
??? Cell contents reference from a non-cell array object.
What is the solution
Error in ==> Nc at 74 Seg{1} = Seg{i}; %#ok<NASGU>
댓글 수: 2
답변 (1개)
Image Analyst
2014년 1월 15일
Seg is just a regular numerical array, NOT a cell array. You created it like this:
Seg = (1:N)';
So you need to refer to it like this Seg(index), NOT like this Seg{index}. Braces are used for cells while parentheses are used for arrays. Please see the FAQ on cells: http://matlab.wikia.com/wiki/FAQ#What_is_a_cell_array.3F
댓글 수: 2
Image Analyst
2014년 1월 15일
You redefined size(), didn't you? What does this say
>> which -all size
or just before that line of code, put this
whos size
You have a size variable or function that it's using that is not the built-in size() function.
참고 항목
카테고리
Help Center 및 File Exchange에서 DICOM Format에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!