help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printing trellis


From: Mike Miller
Subject: Re: printing trellis
Date: Wed, 6 Apr 2016 09:11:36 -0700
User-agent: Mutt/1.5.24 (2015-08-30)

On Wed, Apr 06, 2016 at 14:11:58 +0200, Max wrote:
> 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()?

No, they are both different, t.outputs is also printed in column-first
order. The difference is t.outputs has fewer possible values, so it's
easier to miss by eyeballing, but they are different. Try comparing

  t.outputs

with

  a = str2num (sprintf ("%d %d\n", t.outputs))

which is the same as

  b = reshape (t.outputs, 2, 16).'

You should be able to see that it is indeed printing values from the
first column two at a time, followed by values from the second column.

-- 
mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]