I wrote this function:
function [flag_SO_Sell,flag_SO_Buy,flag_SO_Hold]= SO_Sub_Rule(Sthochestic_Osilator,High_SO,Low_SO)
if Sthochestic_Osilator > High_SO
else if Sthochestic_Osilator < Low_SO
else if (Sthochestic_Osilator > Low_SO) && (Sthochestic_Osilator < High_SO)
with any idea why i got this error from matlab in the command line: Operands to the and && operators must be convertible to logical scalar values.
Error in SO_Sub_Rule (line 13) else if (Sthochestic_Osilator > Low_SO) && (Sthochestic_Osilator < High_SO)
can someone tell what does this error mean?