load('wheel_rail_AW.mat')S = contact_geometry x_new=S.y;y_new =S.r_R; xi = min(x_new) + (max(x_new)-min(x_new)) * rand;yi = interp1(x_new, y_new, xi, 'linear', 'extrap'); figure(1)plot(x_new,y_new,'.',xi,yi,'or')
Now, my question is how to execute the above for particular values of xi(given below) instead of random values being generated by xi each time.
I want the xi values to be xi= -0.02, -0.01, 0, 0.01, 0.02
And I want the program to take -0.02 for the first time and -0.01 for the next iteration, likewise for other 3 values
Please do help me.
Thanks
Best Answer