a = 'test ' switch (a) case 'notatest' disp("This is not a test") case 'test ' disp("Successful test!!") end disp("--------------------") a='test' switch(strcmp(a,'notatest')) case 1 disp("Not a test") case 0 disp("Test") end disp("--------------------") a='notatest' switch(strcmp(a,'notatest')) case 1 disp("Not a test") case 0 disp("Test") end