[scilab-Users] mopen command help needed

Stephen Thomas steeve102000 at yahoo.com
Fri Mar 6 11:26:17 CET 2009


Thank You Francis I got it

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





--- On Fri, 3/6/09, Francis Drossaert <Francis.Drossaert at pgs.com> wrote:
From: Francis Drossaert <Francis.Drossaert at pgs.com>
Subject: RE: [scilab-Users] mopen command help needed
To: users at lists.scilab.org
Date: Friday, March 6, 2009, 2:55 PM




 
 







Hi Stephen, 

   

1. Make sure that the filename is correct. If your data file is
called xyz.dat then the first command should be fid = mopen(‘xyz.dat’,’r’)
or you do: filename  =  ‘xyz.dat’; fid =  mopen(filename,’r’); 

2. Make sure that the data file is in the current working directory
or make sure that the path is correct for example: fid = mopen(‘.../data/xyz.dat’,’r’). 

   

Cheers, 

   

Francis 

   

   



From: Stephen Thomas
[mailto:steeve102000 at yahoo.com] 

Sent: 06 March 2009 04:20

To: users at lists.scilab.org

Subject: [scilab-Users] mopen command help needed 



   


 
  
  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.

  

   
  
     
  
   
  
  
   
  
  
 


   



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
 




      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20090306/4bbc90c7/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ~WRD000.jpg
Type: image/jpeg
Size: 823 bytes
Desc: ~WRD000.jpg
URL: <https://lists.scilab.org/pipermail/users/attachments/20090306/4bbc90c7/attachment.jpg>


More information about the users mailing list