[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: exporting formatted data to a file
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: exporting formatted data to a file |
Date: |
Mon, 4 Feb 2013 13:19:47 -0500 |
On 4 February 2013 12:57, marciobarbalho <address@hidden> wrote:
> I did some searching and couldn't find a command that exports formatted data
> to a file. I have tried with 'save' and 'fprintf' but none of them seems to
> do the same job as scilab's 'fprintfMat'.
This is kind of ugly, but it works:
x = rand(20);
function printfMat(fmt, x)
printf([repmat(sprintf("%s ", fmt),1, columns(x)), "\n"], x)
endfunction
printfMat("%0.2f", x)
Obvious modifications for fprintfMat.
HTH,
- Jordi G. H.
- exporting formatted data to a file, marciobarbalho, 2013/02/04
- Re: exporting formatted data to a file,
Jordi Gutiérrez Hermoso <=
- Re: exporting formatted data to a file, marciobarbalho, 2013/02/05
- Re: exporting formatted data to a file, marciobarbalho, 2013/02/05
- Re: exporting formatted data to a file, Jordi Gutiérrez Hermoso, 2013/02/05
- Re: exporting formatted data to a file, marciobarbalho, 2013/02/05
- Re: exporting formatted data to a file, marco atzeri, 2013/02/05
- RE: exporting formatted data to a file, marciobarbalho, 2013/02/05
- RE: exporting formatted data to a file, marciobarbalho, 2013/02/05
- RE: exporting formatted data to a file, Graham Toal, 2013/02/05
- RE: exporting formatted data to a file, marciobarbalho, 2013/02/05
- Re: exporting formatted data to a file, marco atzeri, 2013/02/05