<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#330000">
Dear Vikash<br>
<br>
Scilab talking. <br>
<br>
try to use plot3d(x,y,z), z being a matrix (as opposed to vector)<br>
<br>
you can build from this working example:<br>
<br>
x=(-10:0.13:10)';<br>
t=(0:0.13:20)';<br>
z=(sin((x*t') ./2).^2) ./ (x *x');<br>
p=x *x';<br>
clf, plot3d(x,t,z)<br>
<br>
note the difference between element-wise operations and matricial
operations like x*t'<br>
<br>
<br>
On 07/12/2011 17:55, Vik@$h Dutt P@ndey wrote:
<blockquote
cite="mid:CAAwybhB059QVtonGrVRYOpmFb+3mB4Do+jgnGc+Vguu_w_5eJw@mail.gmail.com"
type="cite">
<div class="gmail_quote"> <span>Dear Scilab,</span>
<div>
<br>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">I
am Vikash Pandey, an Indian and presently pursuing PhD
research in Nonlinear and Quantum Optics at University of
Malaya, Malaysia.</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"> </div>
<div><font face="arial, sans-serif" color="#222222">I am a new
user of Scilab but I really like this software which is
available for free and almost behaves like a substitute to
the expensive MatLab. </font></div>
<div><font face="arial, sans-serif" color="#222222"><br>
</font></div>
<div><font face="arial, sans-serif" color="#222222">I will
really appreciate if you can help me in overcoming a 3D
plotting problem which I am facing in Scilab. </font><span
style="font-family:arial,sans-serif;font-size:13px"><font
color="#222222">I was trying to plot the curve </font><b><font
color="#000099">[{sin(x*t/2)} / x]^2 </font></b><font
color="#222222">following the below mentioned set of
instructions.</font></span></div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div>
<div><font face="arial, sans-serif" color="#222222"><br>
</font></div>
<div><font color="#663366"><font face="arial, sans-serif">-</font><font
face="arial, sans-serif">->x=(-10:0.013:10);</font></font></div>
<div><font face="arial, sans-serif" color="#663366"> </font></div>
<div><font face="arial, sans-serif" color="#663366">-->t=(0:0.013:20);</font></div>
<div><font face="arial, sans-serif" color="#663366"> </font></div>
<div><font face="arial, sans-serif" color="#663366">-->m=(x
.*t) ./2;</font></div>
<div><font face="arial, sans-serif" color="#663366"> </font></div>
<div><font face="arial, sans-serif" color="#663366">-->p=x
.*x;</font></div>
<div><font face="arial, sans-serif" color="#663366"> </font></div>
<div><font face="arial, sans-serif" color="#663366">-->z=sin(m)
.*sin(m);</font></div>
<div><font face="arial, sans-serif" color="#663366"> </font></div>
<div><font face="arial, sans-serif" color="#663366">-->v=z
./p;</font></div>
<div><font face="arial, sans-serif" color="#663366"> </font></div>
<div><font face="arial, sans-serif" color="#663366">-->clf,
param3d(x,t,v)</font></div>
</div>
</div>
<div><br clear="all">
<div>I had obtained the graph (see attached please) but <b>what
I got was a parametric 3D curve while I was expecting a
plot of 3D surface.</b> Besides, I had also tried plotting
the function using commands <b>fplot3d, plot3d and plot3d1
</b>but all of them ended up with errors. I have attached
two pictures in this email. One of them is the parametric
curve which I got and another is a 3D surface curve which I
was expecting.</div>
<div><br>
</div>
<div>Can you please tell me where I am wrong ? How can I
obtain the expected 3D surface plot for the given function
? </div>
<div>
<div>
<br>
</div>
<div>Please correct me if I am wrong.</div>
<div>
<br>
</div>
<div>I will be thankful to you if I get to hear something
from you on this.</div>
<div><br>
</div>
<div>
Thanks You!</div>
</div>
-- <br>
<div><font face="georgia, serif" color="#3333ff"><span
style="color:rgb(0,0,0);font-family:arial">
<div><font face="georgia,serif"><font color="#3333ff"><b>With
Best Wishes...</b></font></font></div>
<div><font face="georgia,serif" color="#6633ff"><font
color="#3366ff"><br>
</font></font></div>
<div><b><font face="georgia, serif" size="4">Vikash
Pandey</font></b></div>
<div><span
style="color:rgb(51,102,255);font-family:georgia,serif"><br>
</span></div>
<div><font face="georgia, serif" color="#3333ff"><b>PhD
Research Assistant,</b></font></div>
<div><font face="georgia, serif" color="#3333ff"><b>Dept.
of Physics (Quantum and Laser Science Group),</b></font></div>
<div><b><font face="georgia, serif" color="#3333ff">University
of Malaya, </font><span
style="color:rgb(51,51,255);font-family:georgia,serif;background-color:rgb(255,255,255)">Kuala
Lumpur, </span></b></div>
<div><span style="background-color:rgb(255,255,255)"><font
face="georgia, serif" color="#3333ff"><b>50603,
Malaysia</b></font></span></div>
<div><span
style="color:rgb(51,102,255);font-family:georgia,serif"><span
style="color:rgb(68,79,117);font-family:arial,helvetica,sans-serif;background-color:rgb(255,255,255)"><br>
</span></span></div>
<div><font face="georgia,serif"><b><font color="#33cc00">Mobile
Number: </font><font color="#3333ff"> </font><font
color="#999999"><a moz-do-not-send="true"
href="tel:%2B91-898-759-9601"
value="+918987599601" target="_blank">+91-898-759-9601</a>
[India]</font></b></font></div>
<div><font face="georgia, serif"><b><font
color="#3333ff">
+</font><span
style="background-color:rgb(255,255,255)"><font
color="#3333ff">60-010-785-6758</font><font
color="#33cc00"> </font><font color="#33ff33">[</font><font
color="#3333ff">Malaysia</font><font
color="#33ff33">]</font></span></b></font></div>
<div><b><span
style="font-family:arial,helvetica,sans-serif;background-color:rgb(255,255,255)"><font
color="#33cc00">e_mail:</font></span><span
style="color:rgb(51,102,255);font-family:arial,helvetica,sans-serif;background-color:rgb(255,255,255)"> </span><span
style="font-family:arial,helvetica,sans-serif;background-color:rgb(255,255,255)"><font
color="#3333ff"><a moz-do-not-send="true"
href="mailto:vikash4exploring@gmail.com"
target="_blank">vikash4exploring@gmail.com</a></font></span></b></div>
<div><b><font face="arial, helvetica, sans-serif"
color="#33cc00">Skype:</font><font face="arial,
helvetica, sans-serif" color="#3333ff"> vikash4exploring</font></b></div>
<div><font face="arial, helvetica, sans-serif"
color="#3333ff"><br>
</font></div>
</span></font></div>
<br>
</div>
</div>
<br>
<br clear="all">
<div><br>
</div>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
Adrien Vogt-Schilb (Cired) <br>
Tel: (+33) 1 43 94 <b>73 77</b></div>
</body>
</html>