<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Bookman Old Style";
        panose-1:2 5 6 4 5 5 5 2 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.kwd
        {mso-style-name:kwd;}
span.pln
        {mso-style-name:pln;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:192773857;
        mso-list-type:hybrid;
        mso-list-template-ids:2042943894 134807577 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l0:level1
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1
        {mso-list-id:1532570477;
        mso-list-type:hybrid;
        mso-list-template-ids:-1414228442 134807567 134807577 134807579 134807567 134807577 134807579 134807567 134807577 134807579;}
@list l1:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-GB link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi Stephen,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>1. Make sure that the filename is correct. If your data file is
called xyz.dat then the first command should be <i>fid = mopen(‘xyz.dat’,’r’)</i>
or you do: <i>filename  =  ‘xyz.dat’; fid =  mopen(filename,’r’)</i>;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>2. Make sure that the data file is in the current working directory
or make sure that the path is correct for example: <i>fid = mopen(‘../data/xyz.dat’,’r’)</i>.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Cheers,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Francis<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> Stephen Thomas
[mailto:steeve102000@yahoo.com] <br>
<b>Sent:</b> 06 March 2009 04:20<br>
<b>To:</b> users@lists.scilab.org<br>
<b>Subject:</b> [scilab-Users] mopen command help needed<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0>
 <tr>
  <td valign=top style='padding:0cm 0cm 0cm 0cm'>
  <p class=MsoNormal style='margin-bottom:12.0pt'>hi im a newuser to
  scilab..not much prior experience in any other equivalent software too<o:p></o:p></p>
  <pre><span class=pln><span style='color:#40007F'>i want to open a file for reading a set of x y z values from scilab</span></span><span
  style='color:#40007F'><br>
  <span class=pln> i copeied the code frm</span><br>
  <span class=pln> </span></span><span style='font-family:"Bookman Old Style","serif";
  color:#40007F'><br>
 http://spiff.rit.edu/classes/phys317/lectures/readwrite.html<br>
  </span><span style='color:#40007F'><br>
  <span class=pln>Code</span><br>
  <br>
  </span><i><span style='font-family:"Tahoma","sans-serif";color:#40007F'> fid = mopen(filename, "r");<br>
  if (fid == -1)<br>
    error("cannot open file for reading");<br>
  end<br>
  </span></i><span style='font-family:"Bookman Old Style","serif";color:#40007F'><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>
  </span><i><span style='font-family:"Tahoma","sans-serif";color:#40007F'> <br>
fid = mopen(</span></i><i><span style='font-family:"Tahoma","sans-serif";
  color:#407F00'>"filename",</span></i><i><span style='font-family:
  "Tahoma","sans-serif";color:#40007F'> "r");</span></i><span
  style='font-family:"Bookman Old Style","serif";color:#40007F'><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<o:p></o:p></span></pre><pre style='margin-bottom:12.0pt'><span
  style='font-family:"Bookman Old Style","serif";color:#40007F'> get the correct syntax for the function mopen and other functions then?<br>
  <br>
i tried<i> 'help mopen'<br>
  </i>and it displayed<i><br>
  <br>
Calling sequence<br>
  <br>
[fd.err]=mopen( file [,mode ,swap]) <br>
  <br>
  </i>Is this the proper syntax ?? I dont think so ,where should i get the corret sequence then?<br>
 somebody please help..<br>
Thanks<i><br>
  <br>
  <br>
  </i><br>
  <br>
  <o:p></o:p></span></pre>
  <div>
  <p class=MsoNormal><em><span style='font-family:"Arial","sans-serif"'>--------------------------------------------------------------------------------------------------</span></em><o:p></o:p></p>
  </div>
  <p class=MsoNormal>  <o:p></o:p></p>
  <div>
  <p class=MsoNormal><em><span style='font-family:"Arial","sans-serif"'>"Be
  good, be kind, be humane, and charitable; love your fellows; </span></em><o:p></o:p></p>
  </div>
  <p class=MsoNormal>  <o:p></o:p></p>
  <div>
  <p class=MsoNormal><em><span style='font-family:"Arial","sans-serif"'>console
  the afflicted; pardon those who have done you wrong."</span></em><o:p></o:p></p>
  </div>
  <p class=MsoNormal>  <o:p></o:p></p>
  <div>
  <p class=MsoNormal style='margin-bottom:12.0pt'><em><u><span
  style='font-family:"Arial","sans-serif"'>Zoroaster.</span></u></em><i><span
  style='border:solid windowtext 1.0pt;padding:0cm'><img width=100 height=100
  id="_x0000_i1025" src="cid:~WRD000.jpg" alt="Image removed by sender."></span><br>
  <br>
  </i><o:p></o:p></p>
  </div>
  <p class=MsoNormal><o:p> </o:p></p>
  <div>
  <p class=MsoNormal><span style='border:solid windowtext 1.0pt;padding:0cm'><img
  width=100 height=100 id="_x0000_i1026" src="cid:~WRD000.jpg"
  alt="Image removed by sender."></span><o:p></o:p></p>
  </div>
  <div>
  <p class=MsoNormal><a href="http://ubuntucounter.geekosophical.net"
  target="_blank" title="The UbuntuCounter Project - user number # 22904"><span
  style='border:solid windowtext 1.0pt;padding:0cm;text-decoration:none'><img
  border=0 width=100 height=100 id="_x0000_i1027" src="cid:~WRD000.jpg"
  alt="Image removed by sender. The Ubuntu Counter Project - user number # 22904"></span></a><o:p></o:p></p>
  </div>
  </td>
 </tr>
</table>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'><o:p> </o:p></span></p>

</div>

This email and any files contained therein is confidential and may contain privileged information.  If you are not the named addressee(s) or you have otherwise received this in error, you should not distribute or copy this e-mail or use any of its content for any purpose. Please notify the sender immediately by e-mail if you have received this e-mail in error and delete it from your system
</body>

</html>