<meta http-equiv="content-type" content="text/html; charset=utf-8">Thanks very much Mathieu.<div><br></div><div><div>Another question: how can I plot3d three vectors without any logical relationships? For example, there is no f(x,y)=z.</div>
<div><br></div><div>Many thanks.</div><div><br></div><div>Peng</div></div><div><br></div><br><div class="gmail_quote">On 7 July 2010 13:17, Mathieu Dubois <span dir="ltr"><<a href="mailto:mathieu.dubois@limsi.fr">mathieu.dubois@limsi.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Peng,<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have managed to let Scilab read data from file and display them however I like. But, how can I dynamically create vectors out of the data it reads line by line?<br>
</blockquote></div>
I assume that you don't know how many lines are going to be read.<br>
<br>
One way to do this is:<br>
1) create an empty vector: v=[]<br>
2) for each line you can append your data with: v($+1) = new_data<br>
$ is the scilab equivalent of matlab end operator. Scilab takes care of data allocation and so on...<br>
It works also with matrices.<br>
<br>
As a toy example, look at the attached file.<br>
<br>
HTH,<br><font color="#888888">
Mathieu<br>
<br>
</font></blockquote></div><br>