Hi Samuel,

You could try something like:
c = (1:10)';
fd=mopen("/tmp/foo.bar");
mfprintf(fd, "%5.3f\n", c);
mclose(fd);

If you need to print a matrix you can do
A=rand(3,4);
fd=mopen("/tmp/bar.foo","wt");
mfprintf(fd, "%5.3f %5.3f %5.3f %5.3f\n",A)
mclose(fd);

Best regards

Calixte

On 04/03/2013 21:40, Samuel Enibe wrote:
Dear Sir,

I would like to print a given column in a matrix with a specific number of decimal places. The *format* function does not give the same number of decimal places for columns containing data of varying length. On the other hand, *fprintf* and the like appear suitable for single float at a time. Is there a version of *fprintf* and co that can be used directly for a matrix?

--
Samuel Ogbonna Enibe
University of Nigeria, Nsukka, Nigeria
Tel: +2348063646798



_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users


--
Calixte Denizet
Software Development Engineer
-----------------------------------------------------------
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
http://www.scilab-enterprises.com

_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to