[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Splines
From: |
Carlo de Falco |
Subject: |
Re: Splines |
Date: |
Wed, 1 Oct 2008 11:18:36 +0100 |
I'm typing directly to email without testing,
inline documentation of the cited functions should
help in case of typo problems ...
On 01/ott/08, at 10:26, Kearan Mc Pherson wrote:
I plot a 3D graph using two data.dat files like this :
d1 = load graph.dat ;
d2 = load graph2.dat ;
d1 = sortrows (d1);
d2 = sortrows (d2);
x = unique ([d1(:,1); d2(:,1)]);
--------
y = interp1 (d1(:,1), d1(:,2), x, "cubic", "extrap");
z = interp1 (d2(:,1), d2(:,2), x, "cubic", "extrap");
---------
whith spline this would be:
-----------
y = spline(d1(:,1), d1(:,2), x);
z = spline(d2(:,1), d2(:,2), x);
-----------
if you have the octave-forge package "splines" installed you can also
try
-----------
ycm = ppval(catmullrom(d1(:,1), d1(:,2)), x);
zcm = ppval(catmullrom(d2(:,1), d2(:,2)), x);
-----------
use
plot3 (x, y, z, x, ycm, zcm);
to compare the results
I would like to use splines, can anyone please assist me regarding
this matter, as i'm new to octave and gnuplot. thanks and regards
c.
- Splines, Kearan Mc Pherson, 2008/10/01
- Re: Splines, Jaroslav Hajek, 2008/10/01
- Re: Splines, Carlo de Falco, 2008/10/01
- Re: Splines, Jaroslav Hajek, 2008/10/01
- Re: Splines, Carlo de Falco, 2008/10/01
- Re: Splines, Jaroslav Hajek, 2008/10/01
- Re: Splines, Carlo de Falco, 2008/10/01
- Re: Splines, Kearan Mc Pherson, 2008/10/21
Re: Splines,
Carlo de Falco <=