필터 지우기
필터 지우기

??? 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.

댓글을 달려면 로그인하십시오.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by