Interpolation time response

Oscar Bayona Candel oscarbayonacandel at hotmail.com
Mon Jul 13 16:26:17 CDT 2009


Thanks a lot for all.

 


 
> Date: Mon, 13 Jul 2009 13:43:05 -0400
> From: przemek at jazz.ncnr.nist.gov
> To: oscarbayonacandel at hotmail.com; help at octave.org
> Subject: Re: Interpolation time response
> 
> 
> You are recalculating spline 10000+ times, getting the same result laboriously every time.
> Use spline to calculate the individual datapoints, as explained in 'help spline'
> 
> a =[ 1 1
> 30 2
> 60 8
> 90 10
> 7300 27
> 7665 30
> 8030 31
> 8395 32
> 8760 37
> 9125 38
> 9490 44
> 9855 46
> 10220 48
> 10585 50
> 10950 53 ];
> y=spline(a(:,1),a(:,2),1:10950);
> plot(a(:,1),a(:,2),"+-",1:10950,y)
> 
> As you can see, spline does some surprising things with sparse datasets; I would 
> recommend the interpolation routines (interp1 for instance):
> 
> plot(a(:,1),a(:,2),"+-",1:10950,interp1(a(:,1),a(:,2),1:10950,"pchip"))
> 
> Try different interpolation algorithms, 'nearest' 'linear' 'cubic' 'spline'

_________________________________________________________________
Chatea sin límites en Messenger con la tarifa plana de Orange
http://serviciosmoviles.es.msn.com/messenger/orange.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090713/d9b4eccd/attachment.html 


More information about the Help-octave mailing list