array1 = [1 2 3]; % this will change in the program
array2 = [4 5 6]; % this will change in the program switch anyVariable case {array1} disp('1') case {array2} disp('2') otherwise disp('3') end
This always displays 3, irrespective of the value of anyVariable. Shall I change it to if-elseif kind structure?
Best Answer