Hi everyone.

locations = find(logical(good_var));
svar=var{i}(locations);

In the above code, 'logical' converts the elements of the array good_var into 
logicals. 'find' returns indices that evaluate to TRUE. So now, locations 
contain indices of non-zero elements of good_var.

In the next statement, svar extracts all the elements of var with the indices 
contained in locations.

But the two statements give me the error:
"error: octcdf: indexes must be contiguous"

Thanks,
Nands

------------------------------------------------------------------------------

_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to