You posted an image of your code rather than the code itself, so I can’t copy it and run it.
One option would be to add these lines just before the end of your for loop:
xvs{n} = xv;
yvs{n} = yv;
That would save them in the respective cell arrays so you would have them to process later.
Also, you don’t need the:
n = n + 1;
assignment. The for loop will iterate that itself, and ignore anything you do to change it in the loop.


