advice in reading huge text file including words and numbers

Carrico, Paul paul.carrico at esterline.com
Fri Jun 10 12:36:33 CEST 2011


Dear all,
 
May I have some advices in the way to read a (huge) text file including
words and numbers ? ... Let me saying that both words and numbers are
important and they have to be recorded !
 
 
By using the following way it works, but for huge text file including
hundred thousands of line it's too long ....
- reading each line up to the end
- on each line determining the space character localization to determine
the columns
- converting the text in number using eval(part ....))
- recording ...
- and so on
 
Furthermore as often I'm sure internal Scilab function exists providing
better (and faster) results ....
 
I tried fscanfMAT function (failed) as well as the read_csv one ... the
previous function works but how can I distinguish characters from
numbers ? another function than eval ?
 
A basic example is provided to well understand the request
 
Thanks for any advice
 
Paul

--------------------------------------------------------------------------------


Le présent mail et ses pièces jointes sont confidentiels et destinés à la personne ou aux personnes visée(s) ci-dessus. Si vous avez reçu cet e-mail par erreur, veuillez contacter immédiatement l'expéditeur et effacer le message de votre système. Toute divulgation, copie ou distribution de cet e-mail est strictement interdite.

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please contact the sender and delete the email from your system. If you are not the named addressee you should not disseminate, distribute or copy this email.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110610/f956972b/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cube.msh
Type: application/octet-stream
Size: 404 bytes
Desc: cube.msh
URL: <https://lists.scilab.org/pipermail/users/attachments/20110610/f956972b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: read_csv.sce
Type: application/octet-stream
Size: 209 bytes
Desc: read_csv.sce
URL: <https://lists.scilab.org/pipermail/users/attachments/20110610/f956972b/attachment-0001.obj>


More information about the users mailing list