I am going through a book which is teaching the basics of m files, and one loop they have done is:
for i = 1:m
for j = 1:n
A(i,j) = a/(i + j – 1);
end
end
A
However matlab doesn't understand what " i = 1:n" means, and neither do I. I am guessing it is the set of all real numbers or integers from 1 to n, but maybe because it hasn't been set, matlab doesn't know what it is?
How would I fix this?
Best Answer