<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Calibri">Hi,<br>
<br>
I believe the problem is on the encoding of the text<br>
</font><br>
<pre style="font-family:Monospaced;font-style:normal;font-size:16.0;"><span style="color:rgb(0,0,0);">A</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(50,185,185);">zeros</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">151</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">3</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(0,0,0);">x</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(74,85,219);">[</span><span style="color:rgb(188,143,143);">0.0</span> <span style="color:rgb(188,143,143);">5.0</span> <span style="color:rgb(188,143,143);">10.0</span> <span style="color:rgb(188,143,143);">15.0</span> <span style="color:rgb(188,143,143);">19.0</span><span style="color:rgb(74,85,219);">]</span>
<span style="color:rgb(0,0,0);">i</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(188,143,143);">5</span>
<span style="color:rgb(0,0,0);">A</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(0,0,0);">x</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">i</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(160,32,240);">for</span> <span style="color:rgb(0,0,0);">i</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);">5</span>
<span style="color:rgb(0,0,0);">A</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(92,92,92);">=</span><span style="color:rgb(0,0,0);">x</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(0,0,0);">i</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(160,32,240);">end</span></pre>
This worked for me without any problems<br>
compare<br>
<pre wrap="">ascii("A(1,:)=x(i);") // Text copied from your original mail
and
ascii("A(1,:)=x(i);") // Text copied from my console
</pre>
Best,<br>
<br>
<div class="moz-cite-prefix">Le 05/06/2015 13:40,
<a class="moz-txt-link-abbreviated" href="mailto:paul.carrico@free.fr">paul.carrico@free.fr</a> a écrit :<br>
</div>
<blockquote
cite="mid:97025184.510425714.1433504420188.JavaMail.root@zimbra5-e1.priv.proxad.net"
type="cite">
<pre wrap="">hi
Maybe you should first explain what you would like to do ...
A is a matrix 151x3
x is a matrix 1x5
I do not understand the prupose of the loop????
Depending on what you are expecting for, a good solution will be found
Paul
----- Mail d'origine -----
De: fujimoto2005 <a class="moz-txt-link-rfc2396E" href="mailto:fujimoto2005@gmail.com"><fujimoto2005@gmail.com></a>
À: <a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
Envoyé: Fri, 05 Jun 2015 12:36:58 +0200 (CEST)
Objet: [Scilab-users] for-loop does't work
I run the following script.
It works at 4th line
But It failes from 5th line to 7th line.
It seems to be right
Where is this script wrong?
*******************
A=zeros(151,3);
x=[0.0 5.0 10.0 15.0 19.0]
i=5
A(1,:)=x(i)
for i=1:5
A(1,:)=x(i);
end
--
View this message in context: <a class="moz-txt-link-freetext" href="http://mailinglists.scilab.org/for-loop-does-t-work-tp4032382.html">http://mailinglists.scilab.org/for-loop-does-t-work-tp4032382.html</a>
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
_______________________________________________
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>
_______________________________________________
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>
<pre class="moz-signature" cols="72">--
Pierre-Aimé Agnel
R&D Projects Manager
Phone: +33.1.80.77.04.67
Mobile: +33.6.82.49.35.23
-----------------------------------------------------------
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
Phone: +33.1.80.77.04.68
<a class="moz-txt-link-freetext" href="http://www.scilab-enterprises.com">http://www.scilab-enterprises.com</a> </pre>
</body>
</html>