help-octave
[Top][All Lists]
Advanced

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

Re: operation x=x(:)


From: John W. Eaton
Subject: Re: operation x=x(:)
Date: Wed, 5 May 1999 21:27:47 -0500 (CDT)

The following patch (for the 2.1.x sources) should cause Octave to
always return a column vector for A(:).  The change is the same for
the 2.0.x sources.

jwe

Index: Array2-idx.h
===================================================================
RCS file: /home/jwe/src/master/octave/liboctave/Array2-idx.h,v
retrieving revision 1.21
diff -c -r1.21 Array2-idx.h
*** Array2-idx.h        1998/09/24 19:00:14     1.21
--- Array2-idx.h        1999/05/06 00:58:08
***************
*** 84,93 ****
      }
    else if (nr == 1 || nc == 1)
      {
!       int result_is_column_vector = (nc == 1);
! 
!       if (liboctave_dfi_flag && idx.is_colon ())
!           result_is_column_vector = 1;
  
        Array<T> tmp = Array<T>::index (idx);
  
--- 84,90 ----
      }
    else if (nr == 1 || nc == 1)
      {
!       int result_is_column_vector = (nc == 1 || idx.is_colon ());
  
        Array<T> tmp = Array<T>::index (idx);
  



reply via email to

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