Oct-file magic

dbateman dbateman at free.fr
Thu Jul 3 02:36:28 CDT 2008




Michael P Friedlander wrote:
> 
> from within Octave, does this oct-file work in-place, or does it  
> modify a copy of x? 
> 

It makes a copy when you call fortran_vec. Something ugly tht might work is

const double *px1 = x.fortran_vec ();
double *px2 = const_cast<double *>px1;

though do you really want to do that?

D.
-- 
View this message in context: http://www.nabble.com/Oct-file-magic-tp18250811p18253440.html
Sent from the Octave - General mailing list archive at Nabble.com.



More information about the Help-octave mailing list