-1

I have output = A(:,Nout) Nout = points along the array..... : = all points in column

So, it is saying the values in the last column.

How do I use output as A at the first column for the next iteration?

Unheilig
  • 16,196
  • 193
  • 68
  • 98
sam
  • 1

1 Answers1

0

Your question is not clear. You may mean a variety of things.

If you want to loop through values in the first column in some order specified by your last column you can:

Asort = A ( A (:, end), :);

and then loop through Asort.

You may also mean to loop N times for each row where N is defined by last column of A. You can do it using a nested loop:

for Arow = A(:, end)  
    for ii = 1:Arow

        % your code here

    end
end  

You may also mean several other things, but instead me guessing you could try clarifing a bit. :)
(it should be a comment but I can't add comments yet, sorry)

mmagnuski
  • 1,249
  • 1
  • 11
  • 23