[scilab-Users] "griddata" functuion

Samuel GOUGEON Samuel.Gougeon at univ-lemans.fr
Thu Oct 14 11:43:50 CEST 2010


  ----- Message d'origine -----
De : hosomi
Date : 14/10/2010 08:20:
> Hi,
>
> I have a trouble on scilab.
> I would like to plot csv data by sclilab. I attached the M-code,
> graphics of MATLAB, and csx data.
>
> How can I get the same result as MATLAB with scilab?
For scattered data, you must use cshep2d() and eval_cshep2d().
So a possible equivalent script could be :

dat = eval(read_csv("data1.csv"));
N = 100;
x = ones(N,1)*linspace(min(dat(:,1)),max(dat(:,1)),N);
y = linspace(min(dat(:,2)),max(dat(:,2)),N)'*ones(1,N);
z = eval_cshep2d(x,y,cshep2d(dat));
clf
surf(x,y,z)
//e = gce(); e.color_flag=3; // interp color mode
xtitle("Merit Function","X","Y")

Regards
Samuel




More information about the users mailing list