in my program i have used for loop and if loop at the end i am getting ???index exceeds matrix dimensions this comment after calculating 1 value, where i have to calculate 42 values i used examplefor x=1:42if x==1 a=1; b=2;endif x==2 a=2; b=3;end::::::if x==42 a=42; b=43;endc=a+bend
MATLAB: ???index exceeds matrix dimensions
MATLAB
Best Answer