help-octave
[Top][All Lists]
Advanced

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

Re: Accessing Pointer to NDarray/Matrix data in C oct-file


From: Jaroslav Hajek
Subject: Re: Accessing Pointer to NDarray/Matrix data in C oct-file
Date: Fri, 3 Jul 2009 09:43:33 +0200

On Thu, Jul 2, 2009 at 5:30 PM, cjbattagl<address@hidden> wrote:
>
> Nevermind!
> I have got the code working again by using:
> const double* a_data = A.data();
>
> I'll refrain from having this posted to the mailing list.
> Casey

Yes, this is the recommended way to get a read-only pointer. To obtain
a writable pointer, use A.fortran_vec () (the odd name is a relic from
the past). This will correctly sort out possible multiple references
to the matrix.

regards

-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

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