error evaluating binary operator

Jordi Gutiérrez Hermoso jordigh at gmail.com
Sat Aug 2 12:00:42 CDT 2008


2008/8/1 Emily Moberg <emilym122 at hotmail.com>:
> Hi!
> I have the following for loop
> [m,o]=size(A)
> for n=1:o
>
> idx=find(A(:,n)==0);
>
> if length(idx)>=m*(.7);
>
> A(:,n)=[];
>
> endif;
>
> endfor;
>
> and I keep getting an error evaluating binary operator '=='  for the
> idx=find(A(:,n)==0) line.

My guess is that it looks a little fishy that you're removing columns
from a matrix as you are iterating along the columns of that matrix. I
don't have a running instance of Octave to test this, however. And
what is the first error, not the last? Is the first error something
about an index out of bounds?

HTH,
- Jordi G. H.


More information about the Help-octave mailing list