<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hi Mohammad,<br>
<br>
You can use the following script:<br>
<br>
<pre style="font-family:Monospaced;font-style:normal;font-size:12.0;"><span style="color:rgb(0,0,0);">fig</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(174,92,176);text-decoration:underline;">scf</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(50,185,185);">plot2d</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(74,85,219);">[</span><span style="color:rgb(92,92,92);">-</span><span style="color:rgb(50,185,185);">cos</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">0</span><span style="color:rgb(74,85,219);">)</span> <span style="color:rgb(50,185,185);">cos</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">0</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(74,85,219);">[</span><span style="color:rgb(92,92,92);">-</span><span style="color:rgb(50,185,185);">sin</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">0</span><span style="color:rgb(74,85,219);">)</span> <span style="color:rgb(50,185,185);">sin</span><span style="color:rgb(74,85,219);">(</span><span sty
="" le="color:rgb(188,143,143);">0</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(0,0,0);">rect</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(74,85,219);">[</span><span style="color:rgb(92,92,92);">-</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(92,92,92);">-</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(0,0,0);">style</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(188,143,143);">2</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(0,0,0);">fig</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">children</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">isoview</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(188,143,143);">'</span><span style="color:rgb(188,143,143);">on</span><span style="color:rgb(188,143,143);">'</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">fig</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">children</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">axes_visible</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(74,85,219);">[</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">off</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">off</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">off</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">h</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(0,0,0);">fig</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">children</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">children</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">children</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(160,32,240);">for</span> <span style="color:rgb(0,0,0);">q</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(188,143,143);">N</span>
<span style="color:rgb(0,0,0);">theta</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(0,0,0);"></span> <span style="color:rgb(100,174,100);">//calulation step</span>
<span style="color:rgb(0,0,0);">h</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">data</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(74,85,219);">[</span><span style="color:rgb(92,92,92);">-</span><span style="color:rgb(50,185,185);">cos</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">theta</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(92,92,92);">-</span><span style="color:rgb(50,185,185);">sin</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">theta</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span><span style="color:rgb(50,185,185);">cos</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">theta</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(50,185,185);
">sin</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">theta</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(74,85,219);">]</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(50,185,185);">sleep</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">100</span><span style="color:rgb(74,85,219);">) </span><span style="color:rgb(74,85,219);"><span style="color:rgb(100,174,100);">//execution pausa in milisec step</span>
</span>
<span style="color:rgb(160,32,240);">end
<font color="#000000">Yours,
Alex</font>
</span></pre>
<div class="moz-cite-prefix">2014/07/15 17:34, Mohammad EL JAWAD
[via Scilab / Xcos - Mailing Lists Archives] пишет:<br>
</div>
<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' cite="mid:53C262FB.8020301@gmail.com" type="cite"> hi
all;
<br>
i have a for loop that calculates an angle theta
<br>
then i generate two matrix x=[-cos(theta) cos(theta)] and
y=[-sin(theta) <br>
sin(theta)] in matlab i use the drawnow command inside the for
loop to <br>
generate the animation of the rotating rod
<br>
as you know the drawnow matlab function has no scilab equivalent
and i <br>
was wondering if there is an way to generate the animation
<br>
regards
<br>
my code in matlab is something like that
<br>
<br>
for q=1:N
<br>
theta = //calulation step
<br>
x=[-cos(theta) cos(theta)]
<br>
y=[-sin(theta) sin(theta)]
<br>
plot(x,y)
<br>
drawnow
<br>
end
<br>
_______________________________________________
<br>
users mailing list
<br>
<a moz-do-not-send="true"
href="/user/SendEmail.jtp?type=node&node=4030914&i=0"
target="_top" rel="nofollow" link="external">[hidden email]</a>
<br>
<a moz-do-not-send="true"
href="http://lists.scilab.org/mailman/listinfo/users"
target="_top" rel="nofollow" link="external">http://lists.scilab.org/mailman/listinfo/users</a><br>
<br>
<br>
<hr color="#cccccc" size="1" noshade="noshade">
<div style="color:#444; font: 12px
tahoma,geneva,helvetica,arial,sans-serif;">
<div style="font-weight:bold">If you reply to this email, your
message will be added to the discussion below:</div>
<a moz-do-not-send="true"
href="http://mailinglists.scilab.org/Scilab-users-rotating-animated-rod-in-scilab-tp4030914.html" target="_top" rel="nofollow" link="external">http://mailinglists.scilab.org/Scilab-users-rotating-animated-rod-in-scilab-tp4030914.html</a>
</div>
<div style="color:#666; font: 11px
tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
To start a new topic under Scilab users - Mailing Lists
Archives, email <a href="/user/SendEmail.jtp?type=node&node=4030932&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a> <br>
To unsubscribe from Scilab users - Mailing Lists Archives, <a
moz-do-not-send="true"
href="" target="_top" rel="nofollow" link="external">click
here</a>.<br>
<a moz-do-not-send="true"
href="http://mailinglists.scilab.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_top" link="external">NAML</a> </div>
</blockquote>
<br>
<br/><hr align="left" width="300" />
View this message in context: <a href="http://mailinglists.scilab.org/Re-Scilab-users-rotating-animated-rod-in-scilab-tp4030932.html">Re: [Scilab-users] rotating animated rod in scilab</a><br/>
Sent from the <a href="http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html">Scilab users - Mailing Lists Archives mailing list archive</a> at Nabble.com.<br/>