On Mon, Sep 12, 2011 at 5:10 PM, Przemek Klosowski
<[email protected]> wrote:
> I'd suggest using ready-made numerical software, such as Octave (the
> Free clone of Matlab). It's pretty standard on Linux (yum or apt-get
> should install it for your distribution). Run it on the command line
> ('octave') and execute the following commands:
>
> x=linspace(0,1,9)                    # set up a simple set of nodes (x 
> values) in the [0,1] interval
> y=[0 .1 .22 .3 .25 .3 .22 .1 0]   # interpolate these corresponding values
> xx=linspace(0,1,100);             # we'll be asking for 100 interpolated 
> points
> yy=interp1(x,y,xx,'spline');       # this is a cubic spline; check 'help 
> interp1' for other options
> plot(x,y,'+',xx,yy)                      # plot the resulting spline
> save yy.dat yy                          # store the interpolated values in 
> file yy.dat
>

And of course you can interpolate in 2 dimensions as well:  run 'demo
interp2' on the Octave commandline.

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to