From: Eindhoven Technical University Ayyapureddi on
Hello,

Does anybody have run the example code of TriScatteredInterp.

I am trying to run the example code of TriScatteredInterp, but was not successful.

Here is the example code n error note.

--- Code
clc
clear all
format long e
% Create a data set:
x = rand(100,1)*4-2;
y = rand(100,1)*4-2;
z = (x.^2+y.^2);
% Construct the interpolant:
F = TriScatteredInterp(x,y,z);
% Evaluate the interpolant at the locations (qx, qy). The corresponding value at these locations is qz:
ti = -2:.25:2;
[qx,qy] = meshgrid(ti,ti);
qz = F(qx,qy);
mesh(qx,qy,qz);
hold on;
plot3(x,y,z,'o');
---- error
??? Undefined function or method 'TriScatteredInterp' for input arguments of type 'double'.

Error in ==> exercise1 at 9
F = TriScatteredInterp(x,y,z);

Hope to see the response as soon as possible.

Thanking you in-advance.

A Sridhar.
From: Steven Lord on

"Eindhoven Technical University Ayyapureddi" <s.ayyapureddi(a)tue.nl> wrote in
message news:ht0vmt$hju$1(a)fred.mathworks.com...
> Hello,
>
> Does anybody have run the example code of TriScatteredInterp.
>
> I am trying to run the example code of TriScatteredInterp, but was not
> successful.
>
> Here is the example code n error note.

*snip*

> ---- error
> ??? Undefined function or method 'TriScatteredInterp' for input arguments
> of type 'double'.
>
> Error in ==> exercise1 at 9
> F = TriScatteredInterp(x,y,z);
>
> Hope to see the response as soon as possible.

What version of MATLAB are you using? The online documentation is for the
most recent release, currently release R2010a. The TriScatteredInterp class
was introduced in release R2009a, as indicated by the Release Notes:

http://www.mathworks.com/access/helpdesk/help/techdoc/rn/bryg9vd-1.html#bryg9vd-2

so if you are using an older version of MATLAB, you will not be able to use
it.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com