Hi all,
I'm pretty stuck on this one; I want to fill a 10×100 matrix as: A =
[1 2 3 . . .100 101 102 103 . 201 202 203 . . . . . . . 901 . . . . 1000]
Since I want to make use of for loops, I've made the following code:
u=10; v=100; A=zeros(u,v); for m=1:u; for n=1:v; A(m,n)= .... endend
I manage to get the first row going from 1 to 100, but I can't seem to get the second row (and so on) to start with A(1,1)+m*100. I can guess that the problem is in the first loop, but I just can't seem to solve it. Anyone here who can help me getting the right code for A(m,n)=….? Or am I doing it completely wrong in the first place?
Thank you!
Best Answer