<div dir="ltr"><div><div>Hello, rathodprashnt !<br><br></div>You need to move <span style="font-family:monospace,monospace">plot(x,y)</span> to the end of <span style="font-family:monospace,monospace">for</span> loop.<br><span style="font-family:monospace,monospace"><br>t=0:0.01:10;<br>x=cos(2*%pi*t); theta=0<br><br>for k=1:4<br> y=cos(2*%pi*k*t);<br> if k==1 then subplot(221)<br> elseif k==2 then subplot(222)<br> elseif k==3 then subplot(223)<br> elseif k==4 then subplot(224)<br> end<br><b> plot(x,y);</b><br>end</span><br><br><img alt="Встроенное изображение 1" src="cid:ii_14b017dcc925361c" height="424" width="515"><br><br></div>I recommend you to read/watch some tutorials on Scilab ( <a href="http://www.openeering.com/scilab_tutorials" target="_blank">http://www.openeering.com/scilab_tutorials</a> or <a href="http://www.scilab.in/spoken-tutorial" target="_blank">http://www.scilab.in/spoken-tutorial</a> ).<br><br><br>With best regards,<br>
<span>maintainer</span> of<a href="http://atoms.scilab.org/toolboxes/Mathieu" target="_blank"> Mathieu functions toolbox for Scilab</a>,<br>
IEEE member, Ph.D., <br>
Nikolay Strelkov.<br><div class="gmail_extra"><div><div><div dir="ltr"><br></div></div></div>
<br><div class="gmail_quote">2015-01-17 13:16 GMT+03:00 rathodprashnt <span dir="ltr"><<a href="mailto:rathodprashnt@gmail.com" target="_blank">rathodprashnt@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hy i am new to scilab and i am trying to run new with subplot command using<br>
(221) to (224) format but some how out of 4 subplot only last one is<br>
visible.<br>
<br>
here is my script<br>
_____________________<br>
<br>
t=0:0.01:10;<br>
x=cos(2*%pi*t); theta=0<br>
<br>
for k=1:4<br>
y=cos(2*%pi*k*t);<br>
if k==1 then subplot(221)<br>
elseif k==2 then subplot(222)<br>
elseif k==3 then subplot(223)<br>
elseif k==4 then subplot(224)<br>
end<br>
end<br>
plot(x,y);<br>
_________________________________<br>
<<a href="http://mailinglists.scilab.org/file/n4031642/Graphic_window_number_0.bmp" target="_blank">http://mailinglists.scilab.org/file/n4031642/Graphic_window_number_0.bmp</a>><br>
<br>
<br>
i have also attached image of graph.<br>
<br>
<br>
thank you<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://mailinglists.scilab.org/subplot-problem-tp4031642.html" target="_blank">http://mailinglists.scilab.org/subplot-problem-tp4031642.html</a><br>
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org" target="_blank">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a><br>
</blockquote></div><br></div></div>