[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: different number of leading spaces for odd/even indices in screen ou
From: |
Max Brister |
Subject: |
Re: different number of leading spaces for odd/even indices in screen output |
Date: |
Wed, 1 Aug 2012 13:04:27 -0500 |
On Wed, Aug 1, 2012 at 12:30 PM, Sergei Steshenko <address@hidden> wrote:
> Hello,
>
> here is a screen session from my self-built octave-3.6.2 on Linux:
>
> "
> octave:1> foo = [1:10]
> foo =
>
> 1 2 3 4 5 6 7 8 9 10
>
> octave:2> foo(1:2:end)
> ans =
>
> 1 3 5 7 9
>
> octave:3> foo(2:2:end)
> ans =
>
> 2 4 6 8 10
>
> octave:4>
>
> "
>
> - hopefully one can see that output of "foo(1:2:end)" has one leading space
> less than the other two cases:
>
> 1 3 5 7 9
> 2 4 6 8 10
>
>
> - is it supposed to be this way ?
>
> ...
>
> I've also noticed that number of spaces between the elements is different.
>
> It's not a real problem, but might indicate a "sleeping" bug in output
> routines.
>
> Thanks,
> Sergei.
It looks to me like the number of spaces depends on the longest number
being printed. For example, try 'foo = 1:11' and 'foo = 1:8'. I think
this makes sense and is expected as it makes the formatting for
matrices nicer.
Max