Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | File Exchange
ATOMS : csv_readwrite details
Login with GitLab

csv_readwrite

Fast functions to read and write csv files
(2555 downloads for this version - 31477 downloads for all versions)
Details
Version
0.5.1
A more recent valid version with binaries for Scilab 5.4 exists: 0.6.1
Authors
Allan CORNET
Michael Baudin
Owner Organization
Scilab - DIGITEO
Maintainers
Michael BAUDIN
Allan CORNET
Category
License
Creation Date
December 20, 2011
Source created on
Scilab 5.4.x
Binaries available on
Scilab 5.4.x:
Linux 32-bit Windows 32-bit Windows 64-bit macOS Linux 64-bit
Install command
--> atomsInstall("csv_readwrite")
Description
            Purpose
-------

The purpose of this module is to read and write 
Comma Separated Values (CSV) data files. 
The goal of this toolbox is to improve the flexibility, consistency and speed of

CSV reading and writing with respect to Scilab built-in 
write_csv and read_csv functions. 

On some large data files, we observed a 100x improvement of the 
speed.

Features
--------

 * csv_default : Get or set defaults for csv files.
 * csv_getToolboxPath : Returns the path to the current module.
 * csv_read : Read comma-separated value file
 * csv_stringtodouble : Convert a matrix of strings to a matrix of doubles.
 * csv_textscan : Read comma-separated value in a matrix of strings
 * csv_write : Write comma-separated value file



To compare speed:

with optimized functions:
stacksize('max');
M = ones(1000, 1000);
tic();
csv_write(M, TMPDIR + "/csv_write_1.csv");
toc()

tic();
r = csv_read(TMPDIR + "/csv_write_1.csv")
toc()


with default scilab functions (be patient):
stacksize('max');
M = ones(1000, 1000);
tic();
write_csv(M, TMPDIR + "/csv_write_1.csv");
toc()

tic();
r = read_csv(TMPDIR + "/csv_write_1.csv")
toc()


csv_readwrite (0.5)
* Fixed ticket #481, #576: csv_read crashed Scilab, if there were negative
values in file            
Files (6)
[150.49 kB]
Source code archive
Same sources as in previous toolbox version, updated to make it available for
Scilab 5.4.0
[120.89 kB]
Linux 32-bit binary for Scilab 5.4.x
Linux 32-bit
Automatically generated by the ATOMS compilation chain

[251.32 kB]
Windows 32-bit binary for Scilab 5.4.x
Windows 32-bit
Automatically generated by the ATOMS compilation chain

[260.61 kB]
Windows 64-bit binary for Scilab 5.4.x
Windows 64-bit
Automatically generated by the ATOMS compilation chain

[115.05 kB]
macOS binary for Scilab 5.4.x
MacOSX version
Automatically generated by the ATOMS compilation chain

[124.33 kB]
Linux 64-bit binary for Scilab 5.4.x
Linux 64-bit
Automatically generated by the ATOMS compilation chain

News (0)
Comments (7)     Leave a comment 
Comment from David Chèze -- December 20, 2011, 12:22:29 PM    
Hello,

atomInstall('csv_readwrite') says the package is not available when trying to install it
on scilab 5.4 alpha1 W7 32 bits. I was using it with my previous scilab 5.3.2 installation
: another way to use it with 5.4 version ?

Thanks
Comment from adrien vogt-schilb -- January 6, 2012, 03:25:43 PM    
hi
atomsInstall('csv_readwrite')  isntalls version 0.5 instead of 0.5.1
Answer from Allan CORNET -- January 6, 2012, 03:28:14 PM    
> hi
> atomsInstall('csv_readwrite')  isntalls version 0.5 instead of 0.5.1

What is you Scilab version ?

Allan
Comment from adrien vogt-schilb -- January 10, 2012, 03:26:32 PM    
it's 5.3.3 on winXP
Comment from adrien vogt-schilb -- January 10, 2012, 03:29:09 PM    
-->atomsLoad("csv_readwrite")
 ans  =
 
     []
 
-->help atomsLoad
 
-->atomsAutoloadList
 ans  =
 
!csv_readwrite  0.5-0  allusers  allusers  !
 
-->atomsGetLoaded
 ans  =
 
!                                                                    !
!                                                                    !
!                                                                    !
!                                                                    !
!                                                                    !
!                                                                    !
!csv_readwrite  0.5-0  allusers  SCI\contrib\csv_readwrite\0.5-0  I  !
 
-->csv_read
  !--error 4 
Variable non définie: csv_read

 
 
-->csv_write
  !--error 4 
Variable non définie: csv_write

 
 
-->atomsIsLoaded csv_readwrite
 ans  =
 
  T  
 
-->csv_read
  !--error 4 
Variable non définie: csv_read
Comment from adrien vogt-schilb -- January 10, 2012, 03:30:50 PM    
(by the way, notice how scilab tells me i have loaded csv_readwrite  0.5-0 , this is why i
said it installs version 5.1.1 instead of 5.1, but maybe this a mistake)
Comment from Administrator ATOMS -- January 10, 2012, 03:41:27 PM    
csv 0.5.1 is only available for scilab >= 5.4, as you can see on the top of this page.
This 
doesn't solve your problem, but explains the 0.5 instead of 0.5.1 as you were expecting
Comment from Allan CORNET -- January 10, 2012, 03:46:54 PM    
Can you try this:


atomsRemove('csv_readwrite')
atomsInstall('csv_readwrite','user')
atomsLoad('csv_readwrite')


        ___________________________________________        
                        scilab-5.3.3

                Consortium Scilab (DIGITEO)
              Copyright (c) 1989-2011 (INRIA)
              Copyright (c) 1989-2007 (ENPC)
        ___________________________________________        
 
 
Startup execution:
  loading initial environment
 
-->atomsInstall('csv_readwrite','user')
 ans  =
 
!csv_readwrite  0.5-0  user  SCIHOME\atoms\csv_readwrite\0.5-0  I  !
 
-->atomsLoad('csv_readwrite')

Start CSV read write
	Load macros
	Load gateways
	Load help
	Load demos
	Type "demo_gui()" and search for "CSV read write" for Demonstrations.

 ans  =
 
!csv_readwrite  0.5-0  user  SCIHOME\atoms\csv_readwrite\0.5-0  !


 
-->funptr('csv_read')
 ans  =
 
    501001.  
 
Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.