a = 'hi';switch acase {'hi','hello'}disp('hi, hello')case 'hi'disp('hi')end
When executing this code, the result is hi, hello. This does not make sense to me. If a = 'hi', then according to the case 'hi' shouldn't the result just be hi. Why is it hi, hello?
Best Answer