i have a question concerning interpolation. I have some curves looking like this:
What i want to do now, ist to "shift" my Data, so that every maximum of the curve has the same X-Coordinate. I think that i should use the interp1 function? But i can´t solve it. What i´ve done so far:
[M4,IX4]=max(fid4_X_average); %to get the coordinate of the maximum value
fid2_X_average=interp1(fid1_time-IX2 ,fid2_X_average, (0:1:sizeX));
But then i get something like that GREEN LINE (i don´t get the whole range of data i had before):
So my maximum value is now at point zero, thats ok, but why has the data before zero been cut?