Info

この質問は閉じられています。 編集または回答するには再度開いてください。

??? Cell contents reference from a non-cell array object.

1 回表示 (過去 30 日間)
med-sweng
med-sweng 2013 年 3 月 20 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
At the following line of code:
p(ismember([four_neighbourhood_cell_array{:}],[C.(sprintf('C%d',k)){:}]) == 1) = membershipMatrix(four_neighbourhood_pixels == 1);
I get the error:
??? Cell contents reference from a non-cell array object.
What does that mean? The reason I used `cell arrays` is that I got an error that `four_neighbourhood_cell_array` & `C.(sprintf('C%d',k))` are not of the same dimension. But, now getting the error you see above.
What can I do to work around this issue?
Thanks.

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 3 月 20 日
編集済み: Azzi Abdelmalek 2013 年 3 月 20 日
If y is your cell array causing the error, add at the beginning of your code
clear y
in your case
clear four_neighbourhood_cell_array

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by