mopen command help needed

Stephen Thomas steeve102000 at yahoo.com
Fri Mar 6 05:20:25 CET 2009


hi im a newuser to scilab..not much prior experience in any other equivalent software too

i want to open a file for reading a set of x y z values from scilab
 i copeied the code frm
 
 http://spiff.rit.edu/classes/phys317/lectures/readwrite.html

Code

 fid = mopen(filename, "r");
  if (fid == -1)
    error("cannot open file for reading");
  end

to scipad editor and tried to execute via  "Load into scilab" i had created an empty file in home directory named "filename "via gedit
before execution .
While execution says "Undefined variable 'filename'
then i changed the code to 
 
fid = mopen("filename", "r");

ie added " " before and after filename then it executes..
what is the problem here i cant understand it..I just copied it as it is from
 http://spiff.rit.edu/classes/phys317/lectures/readwrite.html
Is the syntax used here is wrong??
Where should i get the correct syntax for the function mopen and other functions then?

i tried 'help mopen'
and it displayed

Calling sequence

[fd.err]=mopen( file [,mode ,swap]) 

Is this the proper syntax ?? I dont think so ,where should i get the corret sequence then?
 somebody please help..
Thanks





--------------------------------------------------------------------------------------------------  "Be good, be kind, be humane, and charitable; love your fellows;   console the afflicted; pardon those who have done you wrong."  Zoroaster.






      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20090305/fac5d7b4/attachment.htm>


More information about the users mailing list