help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

warning: value not equal to 1 or 0 converted to logical 1


From: babelproofreader
Subject: warning: value not equal to 1 or 0 converted to logical 1
Date: Tue, 15 Nov 2016 05:43:17 -0800 (PST)

This warning is produced by this code snippet:

condition = ( opt_osc >= opt_osc_smooth ) ; % +1 for longs
short_vec = ( opt_osc < opt_osc_smooth ) ; idx = find( short_vec ) ;
condition( idx ) = -1 ; % -1 for shorts ***WARNING GIVEN ON THIS LINE***

and I don't understand why. The idx vector is just an index vector to set
the values in the condition vector at these indices to -1. opt_osc and
opt_osc_smooth are numeric vectors of equal length with no NaN, NA or inf
values.



--
View this message in context: 
http://octave.1599824.n4.nabble.com/warning-value-not-equal-to-1-or-0-converted-to-logical-1-tp4680617.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]