Hi! I have a homework problem that I have difficulties with.
The problem is asking me to create a m by n matrix, using a function file, whose elements are going to be the sum of the index of each element. For exemple my first column would be A(1,1)=2 A(2,1)=3 A(3,1)=4 and so on.. I also must use the ''for'' loop. I tried to figure out how am I going to solve this problem before typing anything in my script file, so I thought that I could assign a matrix composed of ones, and of the dimensions of my outpout argument like U=ones(m,n) so my index variable ''k'' in my for loop could give the right value of each one after each pass, but I can't figure out hiow can I do that.. Can you give me a hint ?
Thanks!
Best Answer