Re: [Scilab-users] number od decimals with csvWrite

2015-06-26 Thread Станислав

Hi.
I suppose no need to use the round function. Use csvWrite:

A=rand(3,3);

csvWrite(A, 'file_with_A_data.txt', ' ', '.', "%.2e")

7.26e-01 2.32e-01 8.83e-01
1.99e-01 2.31e-01 6.53e-01
5.44e-01 2.16e-01 3.08e-01

By the way, if you want to use a comma as a decimal mark the fourth 
parameter should be ',':


csvWrite(A, 'file_with_A_data.txt', ' ', ',', "%.2e")


Stanislav


26.06.2015 12:09, Serge Steer пишет:

The simplest way is to use round

A=rand(3,3);
B=round(100*A)/100;

Serge Steer
Le 25/06/2015 22:07, Simone Meroni a écrit :

Hi
I want to write some data and export them with

csvWrite

I need to have no more than 2 decimals for aesthetic reasons.

How can I set the number of decimals?

Thanks,

Simone Meroni


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users




___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] number od decimals with csvWrite

2015-06-26 Thread Serge Steer

The simplest way is to use round

A=rand(3,3);
B=round(100*A)/100;

Serge Steer
Le 25/06/2015 22:07, Simone Meroni a écrit :

Hi
I want to write some data and export them with

csvWrite

I need to have no more than 2 decimals for aesthetic reasons.

How can I set the number of decimals?

Thanks,

Simone Meroni


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] number od decimals with csvWrite

2015-06-25 Thread Simone Meroni
Hi
I want to write some data and export them with

csvWrite

I need to have no more than 2 decimals for aesthetic reasons.

How can I set the number of decimals?

Thanks,

Simone Meroni
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users