help-octave
[Top][All Lists]
Advanced

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

Re: Octave equivalent to A = mxGetPr(prhs[0]);


From: Fredrik Lingvall
Subject: Re: Octave equivalent to A = mxGetPr(prhs[0]);
Date: Fri, 09 Jun 2006 15:11:44 +0200
User-agent: Thunderbird 1.5.0.4 (X11/20060604)

David Bateman wrote:


Ok, but it goes against the conventions of octave/matlab in that all
arguments are considered as pass by value. So use at your own risk...

D.
  
Yes I know that it is against the conventions but I save a lot of memory if
I can operate directly on the input matrix using, for example,

    myfunc(A);

instead of the conventional method, where the results are stored in a new
output matrix,

    Y = myfunc(A);

which requires twice as much memory.

/F


reply via email to

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