[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: format compact and loose
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: format compact and loose |
Date: |
Tue, 6 Sep 2011 21:18:49 -0500 |
Moving to maintainers' list....
2011/9/6 Ben Abbott <address@hidden>:
>
> On Sep 6, 2011, at 8:41 PM, Jordi Gutiérrez Hermoso wrote:
>
>> 2011/9/5 Zbigniew Komarnicki <address@hidden>:
>>
>>> So is there any possibility to obtain result similar as in matlab,
>>> i.e. the result will more compact when we use e.g.
>>
>>> to obtain something like this:
>>>
>>> octave:5> rand(2, 3, 3)
>>> ans =
>>> ans(:,:,1) =
>>> 0.602732 0.212420 0.216894
>>> 0.515855 0.749427 0.053278
>>> ans(:,:,2) =
>>> 0.24050 0.13761 0.79709
>>> 0.84495 0.77959 0.94395
>>> ans(:,:,3) =
>>> 0.16946 0.54929 0.15251
>>> 0.78924 0.86582 0.20346
>>>
>>> Is this currently possible or there should be introduce change in
>>> source code in Octave to obtain such 'compact result' ?
>>
>> No, I don't believe this is currently possible right now. I'm thinking
>> of pushing a patch to enable this on the development branch, but I
>> would like first some confirmation that this change isn't going to
>> break something. Is there a reason why we keep that space there?
> If you'd like to post it here, or to the developers mail-list, I'd
> be happy to test it.
Thanks for offering. My patch is attached. I'm not sure if this breaks
things if e.g. you're not using a pager or some other output
situations I haven't thought of. But you offered to test, so I'll let
you do that. :P
Also, for anyone checking my C++: I made the compact_format variable
visible in two more TUs besides its original pr-output.cc. Yes! A
global variable! ;-) But I think it's ok to pollute the global
namespace a little here.
- Jordi G. H.
no-newlines.patch
Description: Text Data
Re: format compact and loose, Zbigniew Komarnicki, 2011/09/07