help-octave
[Top][All Lists]
Advanced

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

Re: matrix problems


From: Francesco Potortì
Subject: Re: matrix problems
Date: Sun, 03 Jun 2012 19:24:18 +0200

>I have a large  (44x44) triangular matrix that I want to run with the
>command *linkage*.
>
>But I get the error message: 'error: number of columns must match (43 !=
>44)'
>
>Well, of course. But the matrix *IS* 44x44.
>
>(I get the same error message when I run *matrix_type*)
>
>I have commas after each matrix element except at the end of each row,
>where there is a ;
>This is as it should be. There are 43 of these ";"'s, not 44, because the
>final row should close with a ], which it does.
>There are 44 rows (of length 44 diminishing to 1).
>
>So, howcum I'm getting this error message?

In a matrix all rows must have the same length.  When Octave sees that
your second row is 43 columns long, whereas the first one was 44 columns
long, it emits an error and stops.

A triangular matrix is a square matrix where about half of the elements
are zero: <http://en.wikipedia.org/wiki/Triangular_matrix>.

-- 
Francesco Potortì (ricercatore)        Voice:  +39.050.315.3058 (op.2111)
ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa         Fax:    +39.050.315.2040  
(entrance 20, 1st floor, room C71)     Web:    http://fly.isti.cnr.it


reply via email to

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