% Monday, February 5 - Class Notes % Jacob Christian % % Switches work in place of if/ifelse if your data % x = input('enter your value') % if (x==3) % disp('hello') % elseif (x==2) % disp('thanks') % elseif (x==1) % disp('goodbye') % WORKS FOR SWITCH % if (x > 3) % disp('hello') % elseif (x > 2) % disp('thanks') % elseif (x > 1) % disp*('goodbye') % DOESN'T WORK FOR SWITCH AT VALUES THAT AREN'T FINITE (x>1,x>2,x>3) x = input('enter value ') switch(x) case 1 disp('hello') case 2 disp('thanks') end