getting cell contents reference from non cell object error for following code
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Image Analyst
le 15 Jan 2014
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 commentaires
Image Analyst
le 15 Jan 2014
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.
Voir également
Catégories
En savoir plus sur DICOM Format dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!