[prev in list] [next in list] [prev in thread] [next in thread]
List: scilab-users
Subject: Re: [Scilab-users] 2D contour for a non-rectangular region.
From: Serge Steer <Serge.Steer () inria ! fr>
Date: 2013-06-07 10:02:15
Message-ID: 51B1AFA7.8050001 () inria ! fr
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Le 07/06/2013 00:50, Ganesh Diwan a écrit :
> How does one go about plotting a 2D contour for a non-rectangular region?
> I have a data file that contains XY data and the potential values at
> the points. The region of interest is not rectangular.
> Is there a way to generate a contour plot of such a data with Scilab?
Yes, just enter your data in a matrix and set the undefined values to %nan
function z=my_surface(x, y),z=x*sin(x)^2*cos(y),endfunction
t=linspace(-%pi,%pi,30);
z=feval(t,t,my_surface);
z(1:15,1:15)=%nan;
clf;contour(t,t,z,20);
Serge Steer
INRIA
> Many thanks in advance for help.
>
>
> _______________________________________________
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
[Attachment #5 (text/html)]
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 07/06/2013 00:50, Ganesh Diwan a
écrit :<br>
</div>
<blockquote
cite="mid:CAL_+43VW+PWGV4dcXGUM-=7T7pAQm90s+R9X2L38ZKRyNcFZEw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>How does one go about plotting a 2D contour for a
non-rectangular region?<br>
</div>
<div>I have a data file that contains XY data and the potential
values at the points. The region of interest is not
rectangular.<br>
</div>
<div>Is there a way to generate a contour plot of such a data
with Scilab?<br>
</div>
</div>
</blockquote>
<br>
Yes, just enter your data in a matrix and set the undefined values
to %nan<br>
<br>
function z=my_surface(x, y),z=x*sin(x)^2*cos(y),endfunction<br>
t=linspace(-%pi,%pi,30);<br>
z=feval(t,t,my_surface);<br>
z(1:15,1:15)=%nan;<br>
clf;contour(t,t,z,20);<br>
<br>
Serge Steer<br>
INRIA<br>
<blockquote
cite="mid:CAL_+43VW+PWGV4dcXGUM-=7T7pAQm90s+R9X2L38ZKRyNcFZEw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Many thanks in advance for help.<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" \
href="mailto:users@lists.scilab.org">users@lists.scilab.org</a> <a \
class="moz-txt-link-freetext" \
href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>
_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic