help-octave
[Top][All Lists]
Advanced

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

oct function question


From: Anand Patil
Subject: oct function question
Date: Sun, 01 Oct 2006 11:14:27 -0700
User-agent: Mozilla Thunderbird 0.9 (Macintosh/20041103)

Hi everyone,

First off, a big thank you to John W. Eaton and everyone else for making Octave available and for putting so much time into these mailing lists! I'm just starting to move over from Matlab to Octave, and it's like escaping from prison.

OK: I'm writing lightweight oct functions that get called millions of times that involve nonlinear operations on matrix elements. Past experience with such situations in C++ indicates that the overhead from any function calls or indirection involved in using Matrix's get and set functions may add up. Is there any way to get the address of the underlying array out of the Matrix class, as with the mex function mxGetPr()?

Also: Is there any way to construct a Matrix so that it shares its underlying array with another Matrix? That is, is it possible to pass a matrix into an oct function but then work with it under a name other than args(i).matrix_value()?

Finally: If the functionality I'm looking for doesn't exist, which files would I have to edit?

Thanks,
Anand


reply via email to

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