[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53083] fixed_point_format: incorrect alignmen
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #53083] fixed_point_format: incorrect alignment |
Date: |
Wed, 7 Mar 2018 12:23:50 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Follow-up Comment #6, bug #53083 (project octave):
You might file a new feature request about this. It isn't related to
fixed_point_format. Rather, Octave looks through the numbers of the matrix
and determines the best printf format that works with all of them. If they
are all integers then Octave won't print a decimal point. For example,
octave:2> x = full (diag (1:3))
x =
1 0 0
0 2 0
0 0 3
But when one of the numbers is a floating point, it uses a common format that
correctly displays floating point and integers. For example,
octave:3> x(1) = pi
x =
3.14159 0.00000 0.00000
0.00000 2.00000 0.00000
0.00000 0.00000 3.00000
I don't think this will be changed, but you could file a Feature Request for
it.
Another possibility, for only seeing the non-zero entries, is to convert the
full matrix to a true sparse matrix. For example,
octave:4> x = sparse (x)
x =
Compressed Column Sparse (rows = 3, cols = 3, nnz = 3 [33%])
(1, 1) -> 3.1416
(2, 2) -> 2
(3, 3) -> 3
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53083>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/