??? Attempt to reference field of non-structure array.

1 回表示 (過去 30 日間)
pratibha rane
pratibha rane 2013 年 4 月 16 日
Following code is for manipulating matrix of image to change color of some pixel
for row=1:rows
for col=1:columns
s=I(row,col);
if(s.Equals(0))
...... end end end
I am getting following error ??? Attempt to reference field of non-structure array.

回答 (1 件)

the cyclist
the cyclist 2013 年 4 月 16 日
In MATLAB syntax,
s.Equals
is referencing a field named "Equals" in a structure named "s".
Are you trying to test if s is equal to zero? If so, then you want
if s==0
  2 件のコメント
pratibha rane
pratibha rane 2013 年 4 月 16 日
ya,thanks ,Its working
the cyclist
the cyclist 2013 年 4 月 16 日
Since my answer solved your issue, please accept it, which may help future users seeking a similar solution.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with Image Processing Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by