clear%Clears the memory clc %Clears the screen x = 10; %x == 10 switch x %switch to some code, depending on the value of x case {1,2,3} display('This is the code I execute if x is either equal to one, two or three'); case 10 display('This is the code I execute if x == 10'); otherwise display('This is the code I execute in all other cases'); end