iseed = -1 !p.charsize=2 npts = 15 t = 0.1 + 0.8*findgen(npts)/npts g = 9.81 x = 0.5*g*t^2 + 0.25*randomn(iseed,npts) plotsym,0,1,/fill plot,t,x,ps=1,xtit = 'Time [s]',ytit = 'Distance [m]' b = transpose([t^2]) y = transpose(x) psi = invert( transpose(b) ## b) ans = psi ## transpose( b) ## y npts = 100 ti = findgen(npts)/npts oplot,ti,ans[0]*ti^2 res = poly_fit(t,x,2) oplot,ti,poly(ti,res),line=2 legend,['Parabola','Polynomial'],lines=[0,2],/top,/left,charsize=1.4 end