<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">hi im a newuser to scilab..not much prior experience in any other equivalent software too<br><br><pre style="font-family: bookman old style,new york,times,serif; color: rgb(64, 0, 127);" class="prettyprint"><code><span class="kwd"></span><span class="pln">i want to open a file for reading a set of x y z values from scilab<br> i copeied the code frm<br> </span></code><br> http://spiff.rit.edu/classes/phys317/lectures/readwrite.html<br><code><span class="pln"><br>Code<br><br></span></code><font style="font-style: italic;" size="2"><span style="font-family: tahoma,new york,times,serif;"> fid = mopen(filename, "r");</span><br style="font-family: tahoma,new york,times,serif;"><span style="font-family: tahoma,new york,times,serif;"> if (fid == -1)</span><br style="font-family: tahoma,new york,times,serif;"><span style="font-family: tahoma,new
york,times,serif;"> error("cannot open file for reading");</span><br style="font-family: tahoma,new york,times,serif;"><span style="font-family: tahoma,new york,times,serif;"> end</span><br style="font-family: tahoma,new york,times,serif;"></font><br>to scipad editor and tried to execute via "Load into scilab" i had created an empty file in home directory named "filename "via gedit<br>before execution .<br>While execution says "Undefined variable 'filename'<br>then i changed the code to <br><font style="font-style: italic;" size="2"><span style="font-family: tahoma,new york,times,serif;"> <br>fid = mopen(<span style="color: rgb(64, 127, 0);">"filename",</span> "r");</span></font><br><br>ie added " " before and after filename then it executes..<br>what is the problem here i cant understand it...I just copied it as it is from<br> http://spiff.rit.edu/classes/phys317/lectures/readwrite.html<br>Is the syntax used here is wrong??<br>Where should i
get the correct syntax for the function mopen and other functions then?<br><br>i tried<span style="font-style: italic;"> 'help mopen'<br></span>and it displayed<span style="font-style: italic;"><br><br>Calling sequence<br><br>[fd.err]=mopen( file [,mode ,swap]) <br><br></span>Is this the proper syntax ?? I dont think so ,where should i get the corret sequence then?<br> somebody please help..<br>Thanks<span style="font-style: italic;"><br><br><br></span><br><br><br></pre><div><font face="arial"><em>--------------------------------------------------------------------------------------------------</em></font></div> <div><font face="arial"><em>"Be good, be kind, be humane, and charitable; love your fellows; </em></font></div> <div><font face="arial"><em>console the afflicted; pardon those who have done you wrong."</em></font></div> <div><em><font face="arial"><u>Zoroaster.</u></font><img
src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/01.gif"><br><br></em><br></div><br><div><img src="http://counter.li.org/cgi-bin/certificate.cgi/474254"></div><div><a rel="nofollow" target="_blank" href="http://ubuntucounter.geekosophical.net" title="The UbuntuCounter Project - user number # 22904"><img src="http://ubuntucounter.geekosophical.net/img/ubuntu-user2.php?user=22904" alt="The Ubuntu Counter Project - user number # 22904"></a></div></td></tr></table><br>