Hello, I am trying to run an if statement with multiple conditions as below,
if abs(a-a_t)>0.0001 && abs(b-b_t)>0.00001 && abs(c-c_t)>0.0001 && abs(d-d_t)>0.00001 x=0; y=0; end
Even when all the conditions are satisfied, the values of x and y are not updated. But, it works if we have just two conditions (I've tried different combinations of two variable values which work, but using all conditions in separate brackets doesn't work). MATLAB documentation says that multiple logical operators could be used, but it doesn't seem to be working in my case. Is there a limit to the number of logical operators that could be combined? Or, am I missing something?
Thanks for your advice.
Best Answer