bugGNU Octave - Bugs: bug #40479, Columns of matrices displayed not...

 
 

bug #40479: Columns of matrices displayed not aligned on decimal point when using some formats

Submitted by:  None
Submitted on:  Tue 05 Nov 2013 12:20:10 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: None
Originator Name: Alfredo Maldonado GuerraOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.4
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 05 Nov 2013 03:43:56 PM UTC, comment #3:

Thanks John. Found output_precision good for my purposes!

Alfredo Maldonado Guerra <amg>
Tue 05 Nov 2013 03:25:41 PM UTC, comment #2:

I checked in the following changeset

http://hg.savannah.gnu.org/hgweb/octave/rev/3a0075793fcd

So I think the problem will be fixed in the upcoming release.

Instead of using format bank, you might also use

output_precision (2)

John W. Eaton <jwe>
Project Administrator
Tue 05 Nov 2013 12:50:44 PM UTC, comment #1:

Sorry, in my original post I didn't get the matrix output correctly displayed because I didn't use verbatim. This is what I meant:

Current output:
The expected output is:

Alfredo Maldonado Guerra <amg>
Tue 05 Nov 2013 12:20:10 PM UTC, original submission:

I noticed that when using "format bank" and "format short g" (at least), matrices are not displayed with columns aligned on the decimal point. Matrices instead are displayed in a rather messy way.

Here's an example:

octave:71> format bank
octave:72> Ua
Ua =

-0.22 -0.11 0.29 -0.41 -0.11 -0.34 -0.52 0.06 0.41
-0.20 -0.07 0.14 -0.55 0.28 0.50 0.07 0.01 0.11
-0.24 0.04 -0.16 -0.59 -0.11 -0.25 0.30 -0.06 -0.49
-0.40 0.06 -0.34 0.10 0.33 0.38 -0.00 0.00 -0.01
-0.64 -0.17 0.36 0.33 -0.16 -0.21 0.17 -0.03 -0.27
-0.27 0.11 -0.43 0.07 0.08 -0.17 -0.28 0.02 0.05
-0.27 0.11 -0.43 0.07 0.08 -0.17 -0.28 0.02 0.05
-0.30 -0.14 0.33 0.19 0.11 0.27 -0.03 0.02 0.17
-0.21 0.27 -0.18 -0.03 -0.54 0.08 0.47 0.04 0.58
-0.01 0.49 0.23 0.02 0.59 -0.39 0.29 -0.25 0.23
-0.04 0.62 0.22 0.00 -0.07 0.11 -0.16 0.68 -0.23
-0.03 0.45 0.14 -0.01 -0.30 0.28 -0.34 -0.68 -0.18

The expected output is:
Ua =

-0.22 -0.11 0.29 -0.41 -0.11 -0.34 -0.52 0.06 0.41
-0.20 -0.07 0.14 -0.55 0.28 0.50 0.07 0.01 0.11
-0.24 0.04 -0.16 -0.59 -0.11 -0.25 0.30 -0.06 -0.49
-0.40 0.06 -0.34 0.10 0.33 0.38 -0.00 0.00 -0.01
-0.64 -0.17 0.36 0.33 -0.16 -0.21 0.17 -0.03 -0.27
-0.27 0.11 -0.43 0.07 0.08 -0.17 -0.28 0.02 0.05
-0.27 0.11 -0.43 0.07 0.08 -0.17 -0.28 0.02 0.05
-0.30 -0.14 0.33 0.19 0.11 0.27 -0.03 0.02 0.17
-0.21 0.27 -0.18 -0.03 -0.54 0.08 0.47 0.04 0.58
-0.01 0.49 0.23 0.02 0.59 -0.39 0.29 -0.25 0.23
-0.04 0.62 0.22 0.00 -0.07 0.11 -0.16 0.68 -0.23
-0.03 0.45 0.14 -0.01 -0.30 0.28 -0.34 -0.68 -0.18

i.e. I would columns aligned on the decimal point. This makes reading matrices so much easier.

I'm using Octave version 3.6.4 on Ubuntu 13.04

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Updated the item)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by amg (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 05 Nov 2013 08:55:47 PM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1