[scilab-Users] exporting a string matrix in scilab 4

Samuel GOUGEON Samuel.Gougeon at univ-lemans.fr
Fri Jun 10 18:32:52 CEST 2011


  Hello Adrien,

You may let write() converting numerical entries in strings:

A = rand(4,7)
write("foo.txt",A,"(10(f10.5,2x))")

Each line of A is processed.
10 is the maximum number of iterations of the next pattern in following 
parentheses (here 7 would be enough)
f10.3 mean float output over 10 chars including 3 figures after decimal dot
2x means 2 spaces

HTH
Samuel

----- Message d'origine -----
De : Adrien Vogt-Schilb
Date : 10/06/2011 16:13:
> Hi everybody
>
> I would like to export a string matrix, say A
> A = string(rand(4,7))
>
> I usually use write_csv for this, but in this occasion i have to use a basic 
> scilab 4 package.
>
> I tried write("foo.txt",A), but this produces a column, and i just don't 
> understand fortan like string format.
>
> Anyone can help?
> thx
>
> -- 
>
> *Adrien Vogt-Schilb*
>
> Research Fellow
>
> vogt at centre-cired.fr <mailto:vogt at centre-cired.fr>
>
> Tel: (+33) 1 43 94 73 96
>
> Fax: (+33) 1 43 94 73 70
>
> CIRED
>
> 	
>
> 45 bis, Av de la Belle Gabrielle
>
> F-94736 Nogent-sur-Marne
>
> http://www.centre-cired.fr/
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20110610/c3a5c7c9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 4092 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20110610/c3a5c7c9/attachment.png>


More information about the users mailing list