Hello all,
I'm trying to find a way to run the following code:
x1=4;x2=4;y1=4;y2=4;switch x1,x2,y1,y2 case x1>0 && y1<0 && ((y2>0) || (y2<0 && x2<0) || (x2>0 && y2<y1)) disp('Subtract from 360') otherwise disp('Keep as is')end
and I get this error:
Error: File: untitled5.m Line: 5 Column: 11Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, orother syntax error. To construct matrices, use brackets instead of parentheses.
I'm not sure if I can use switch case with mutliple variables like that. I'd appreciate it if anyone could lend me hand about this.
Best Answer