What value does var have given the code fragment?
for index = 1:2:7 if index <= 4 var(index) = index; elseif index == 5 var(index) = 2; else var(index+1) = 1; end end
code fragment find value unknown variable
for index = 1:2:7 if index <= 4 var(index) = index; elseif index == 5 var(index) = 2; else var(index+1) = 1; end end
Best Answer