octave-maintainers
[Top][All Lists]
Advanced

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

Re: diagonal matrices specializations


From: Jaroslav Hajek
Subject: Re: diagonal matrices specializations
Date: Thu, 4 Dec 2008 18:40:55 +0100

On Thu, Dec 4, 2008 at 6:08 PM, John W. Eaton <address@hidden> wrote:
> On  3-Dec-2008, Søren Hauberg wrote:
>
> | ons, 03 12 2008 kl. 14:31 +0100, skrev Jaroslav Hajek:
> | > >> ans =
> | > >> diagonal matrix (5x5)
> | > >>    1       ..      0
> | > >>        2
> | > >>    :       3       :
> | > >>                4
> | > >>    0       ..      5
> | > >>
> | > >> the last form seems attractive, but maybe requires a bit more thinking
> | > >> about how to place the dots etc.
> | > >
> | > > This I don't think will work. It would be very hard to read a 20x20
> | > > matrix in a terminal with a width of 80 chars. But I agree, that it
> | > > looks nice for small matrices.
> | > >
> | >
> | > But anyone trying to work visually with 20x20 matrices on a 80-column
> | > terminal is bound to have problems.
> |
> | Not if you print it like a vector, which I think we should just always
> | do.
>
> Since it seems unlikely that we will all agree on the best way to
> display diagonal matrices, maybe it would be best to allow different
> output formats based on some preference?  Perhaps as additional
> options to the format function.  How about something like
>
>  format diag full
>  format diag row
>  format diag column
>

This sounds like a good compromise.

> I'm not sure about the format you show above.  It looks good for small
> matrices with integer elements, but the expectation is that matrices
> too wide for a terminal window will be wrapped, and I don't think this
> format would look very good when wrapped, but maybe it would work.
>
> jwe
>



-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

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