Hey Guys !!
I am working with vectors and I read about it before I post my question but can't still get it… Sorry if it is too basic but its difficult for me.. I have four vectors each of size 1×100.. x,y,g,z.. I did plot (x,y) and (g,z) and It is what I expect.. the four vectors are generated randomly so there is low chance the points values will be identical.. I want my first plot to be identical to my second but with leaving the first 3 points, to clear this part I mean usually points starts from point(1,1),(1,2),(1,3) etc but I shall leave those 3 points for the plot(x,y) and start from(1,4) and make it identical to the first point in plot (g,z) so x,y(1,4)= g,z(1,1) and so on.. so basically the two plots are now identical but the first is a shifted version.. I start breaking the steps to achieve this 1. since the vectors are separated in matlab workspace I thought first I need to concatenate the vectors together.. so I created A[x;y] 2×100 and B[g,z] 2×100.(Successful, I did that) 2. I looped through the points in B with ignoring the first 3 points of A and starting from(1,4) and copy the points.. first 3 points set it as NaN(Successful, I did that) 3.I need now to plot my vectors A,B first in two different plots then in same plot to see the result, here is my problem.. I thought by doing the first two steps I can easily plot A and B scale one down then I will be able to see that they the same but one is shifted but that didn't happen..
Is the way I broke down the problem wrong or my last step was not done properly???
Thanks all in advance !!!
Best Answer