[Top][All Lists]

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

Empty Matrix DLD question

From: Andy+Alison Adler
Subject: Empty Matrix DLD question
Date: Thu, 05 Nov 1998 23:04:27 -0500

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.

I couldn't find any examples of how to do this
in the source.

Is there an approved way to create empty matrices?


reply via email to

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