[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59873] Display of multidimensional variables
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #59873] Display of multidimensional variables could be a little nicer |
Date: |
Thu, 14 Jan 2021 14:28:02 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0 |
URL:
<https://savannah.gnu.org/bugs/?59873>
Summary: Display of multidimensional variables could be a
little nicer
Project: GNU Octave
Submitted by: None
Submitted on: Thu 14 Jan 2021 07:28:00 PM UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Feature Request
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
With the default format, this is the output for a multidimensional matrix,
with the spacing different for each slice:
octave:1> foo = mod ((1:4) + (1:4)' + 4*reshape(1:4,1,1,[]), 11)
foo =
ans(:,:,1) =
6 7 8 9
7 8 9 10
8 9 10 0
9 10 0 1
ans(:,:,2) =
10 0 1 2
0 1 2 3
1 2 3 4
2 3 4 5
ans(:,:,3) =
3 4 5 6
4 5 6 7
5 6 7 8
6 7 8 9
ans(:,:,4) =
7 8 9 10
8 9 10 0
9 10 0 1
10 0 1 2
It would be nicer if the columns were spaced evenly like this (look at the
third slice):
foo =
ans(:,:,1) =
6 7 8 9
7 8 9 10
8 9 10 0
9 10 0 1
ans(:,:,2) =
10 0 1 2
0 1 2 3
1 2 3 4
2 3 4 5
ans(:,:,3) =
3 4 5 6
4 5 6 7
5 6 7 8
6 7 8 9
ans(:,:,4) =
7 8 9 10
8 9 10 0
9 10 0 1
10 0 1 2
One partial workaround is to use "format short g" or "format long g" to align
but those use too much space per element.
I looked in the code for disp() but the formatting rules for number widths are
unclear to me.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59873>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #59873] Display of multidimensional variables could be a little nicer,
anonymous <=