ok, second question which may simplify my reasoning for what i want to do.
x=Force %imported from excel as column vector y=Velocity %imported from excel as column vector plot(x,y)
now, i'm trying to average force, so, how could i write a code that if i give it a velocity of 400m/s, gives me the however many answers there is (say two for ease). this code partially does it but returns only one result.
%example X=Force; Y=Velocity; index=find(Y==400); X_point=X(index)
if this gave me the two results, i could then average them, repeat every however many times to do it for the whole graph. however, i would need to do the positive y values first, then the negative and average separately.
Thanks