[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Empty Matrix DLD question
From: |
John W. Eaton |
Subject: |
Empty Matrix DLD question |
Date: |
Thu, 5 Nov 1998 23:23:09 -0600 (CST) |
On 5-Nov-1998, Andy+Alison Adler <address@hidden> wrote:
| I'd like to return an empty matrix from
| an *oct file.
|
| Initially I hoped that when cx==0
|
| X["ridx"]= ridxX.extract( 0, cx-1);
|
| would return an empty matrix.
| No luck. x.ridx is a two element column vector.
|
| Next, I tried
|
| if ( cx > 0 ) {
| X["ridx"]= ridxX.extract( 0, cx-1);
| } else {
| ColumnVector nullvec(0);
| X["ridx"]= nullvec;
| }
|
| But this segfaults octave.
Hmm. I can't reproduce the problem given just this information. Can
you please send a copmlete bug report to bug-octave that includes a
copmlete test case that demonstrates the bug?
| I couldn't find any examples of how to do this
| in the source.
|
| Is there an approved way to create empty matrices?
Try
X["ridx"] = Matrix ();
Thanks,
jwe