[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
format compact and loose
From: |
Zbigniew Komarnicki |
Subject: |
format compact and loose |
Date: |
Mon, 5 Sep 2011 12:39:12 +0200 |
User-agent: |
KMail/1.13.5 (Linux/2.6.32-5-686; KDE/4.4.5; i686; ; ) |
Hello,
what for is 'format compact' and 'format loose'? There no difference, please
see on the code below:
octave:16> format
octave:17> rand(2,3,3)
ans =
ans(:,:,1) =
0.385381 0.102281 0.081179
0.191353 0.688788 0.702630
ans(:,:,2) =
0.27829 0.60780 0.25063
0.97789 0.83470 0.98665
ans(:,:,3) =
0.39944 0.46261 0.22852
0.96768 0.91418 0.43441
octave:18> format compact
octave:19> rand(2,3,3)
ans =
ans(:,:,1) =
0.924453 0.368667 0.721917
0.161212 0.068016 0.298568
ans(:,:,2) =
0.60422 0.78672 0.11505
0.76467 0.71606 0.54340
ans(:,:,3) =
0.805744 0.532713 0.039782
0.739460 0.911434 0.187737
octave:20> format loose
octave:21> rand(2,3,3)
ans =
ans(:,:,1) =
0.356031 0.067546 0.881393
0.575508 0.449188 0.488027
ans(:,:,2) =
0.61541 0.72712 0.38217
0.83638 0.40433 0.27184
ans(:,:,3) =
0.343706 0.733566 0.967689
0.032310 0.040119 0.957366
octave:22>
There no difference. Help is inadequate:
`compact'
Remove extra blank space around column number labels
producing more compact output with more data per page.
`loose'
Insert blank lines above and below column number labels to
produce a more readable output with less data per page.
(default).
What worse there is too much empty lines at the end, see:
ans(:,:,3) =
0.343706 0.733566 0.967689
0.032310 0.040119 0.957366
one empty line |
second empty line | <-- not needed 3 empty lines
third empty line |
octave:22> <-- prompt line
Is there any chance to correct it as written in help (help format) ?
Thank you for your great work.
I work on Debian/Linux:
GNU Octave, version 3.2.4
Copyright (C) 2009 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'.
Octave was configured for "i486-pc-linux-gnu".
Best regards,
Zbigniew
- format compact and loose,
Zbigniew Komarnicki <=