[scilab-Users] Reading data files

Charles Warner cwarner.cw711 at gmail.com
Sun Apr 17 20:20:14 CEST 2011


Depending on what you know about the contents of the file, there are a
couple of approaches.  If you know how many bytes are in the header, you can
use "mseek" to set the current position of the file pointer.  You can use
"mgetl" to read lines from the file- after each read, the file pointer is
repositioned.  Essentially, you read line by line, and discard the output
until you reach the end of the header section.  If your files are formated
such that the header files are of consistent format, you should be able to
write a script using these functions.

Charlie

On Sun, Apr 17, 2011 at 12:44 PM, Armando Pisani <arpisan at tin.it> wrote:

> Dear Sir,
>  I use scilab to  perform numerical anlysis. I usually produce data files
> with an header that describes the content of the file, so that the first
> line of the file is a list of characters, while the rest of the file is a
> numerical matrix.
> If I ask scilab to read my files I get an error message. Is there a way to
> ask scilab to skip one or more lines when reading a file?
>
>  Thank you very much, yours Armando Pisani.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110417/08cc309c/attachment.htm>


More information about the users mailing list