[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: printing trellis
From: |
Max |
Subject: |
Re: printing trellis |
Date: |
Wed, 6 Apr 2016 14:11:58 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
Yes, I've read that part too. But it does not explain why only 1 out of
2 similar 16x2 matrices is printed differently with printf.
Could there be some subtle difference between them which is not shown
when printing trellis structure directly with disp()?
On 04/06/2016 06:28 AM, Mike Miller wrote:
> On Tue, Apr 05, 2016 at 17:22:54 +0200, Max wrote:
> This actually has nothing to do with the trellis structure, but is the
> way that the Octave printf functions work on array arguments.
>
> Try the following:
>
> >> x = [1, 2; 3, 4]
> x =
>
> 1 2
> 3 4
>
> >> printf ("%d %d\n", x)
> 1 3
> 2 4
>
> Octave simply traverses all arguments in order, and each array argument
> is iterated over in column-major order.
>
> I'm not sure if this is called out specifically in the manual, but this
> section talks briefly about how matrices are interpreted by the printf
> family of functions.
>
> http://www.gnu.org/software/octave/doc/interpreter/Output-Conversion-for-Matrices.html
>
--
Max Suraev <address@hidden> http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte