[scilab-Users] advice in reading huge text file including words and numbers
CHEZE David 227480
david.cheze at cea.fr
Fri Jun 10 12:42:39 CEST 2011
Hi,
You should use the improved function csv_read() (from ATOMS "CSV read write" toolbox) instead of native read_csv() : it's far faster and configuration is easy.
Hope it can help,
David
De : Carrico, Paul [mailto:paul.carrico at esterline.com]
Envoyé : vendredi 10 juin 2011 12:37
À : users at lists.scilab.org
Objet : [scilab-Users] advice in reading huge text file including words and numbers
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/2f14e521/attachment.htm>
More information about the users
mailing list