[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);
- Re: operation x=x(:), (continued)
- Re: operation x=x(:), John W. Eaton, 1999/05/05
- Re: operation x=x(:), Mike Miller, 1999/05/05
- Re: operation x=x(:), John Logsdon, 1999/05/06
- Re: operation x=x(:), Ted Harding, 1999/05/06
- Re: operation x=x(:), John W. Eaton, 1999/05/06
Re: operation x=x(:), A. Scottedward Hodel, 1999/05/05
Re: operation x=x(:), Jonathan King, 1999/05/05
Re: operation x=x(:), heberf, 1999/05/05
Re: operation x=x(:),
John W. Eaton <=