<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Le 14/10/10 11:43, Samuel GOUGEON a écrit :
<blockquote cite="mid:4CB6D0D6.1010807@univ-lemans.fr" type="cite"> -----
Message d'origine -----
<br>
De : hosomi
<br>
Date : 14/10/2010 08:20:
<br>
<blockquote type="cite">Hi,
<br>
<br>
I have a trouble on scilab.
<br>
I would like to plot csv data by sclilab. I attached the M-code,
<br>
graphics of MATLAB, and csx data.
<br>
<br>
How can I get the same result as MATLAB with scilab?
<br>
</blockquote>
For scattered data, you must use cshep2d() and eval_cshep2d().
<br>
</blockquote>
Watch out with this one!<br>
Contrary to Matlab griddata that does linear interpolation,
"cshep2d" uses cubic
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<span style="visibility: visible;" id="search">shepard that
introduces a lot of under- and over-shoot between sample data
points.<br>
It looks nicer than linear interpolated data, but can be a bit
misleading.<br>
<br>
Antoine<br>
</span>
<blockquote cite="mid:4CB6D0D6.1010807@univ-lemans.fr" type="cite">So
a possible equivalent script could be :
<br>
<br>
dat = eval(read_csv("data1.csv"));
<br>
N = 100;
<br>
x = ones(N,1)*linspace(min(dat(:,1)),max(dat(:,1)),N);
<br>
y = linspace(min(dat(:,2)),max(dat(:,2)),N)'*ones(1,N);
<br>
z = eval_cshep2d(x,y,cshep2d(dat));
<br>
clf
<br>
surf(x,y,z)
<br>
//e = gce(); e.color_flag=3; // interp color mode
<br>
xtitle("Merit Function","X","Y")
<br>
<br>
Regards
<br>
Samuel
<br>
<br>
</blockquote>
<br>
</body>
</html>