help-octave
[Top][All Lists]
Advanced

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

Re: an array[count] in octave ?


From: Allahyari Rahim
Subject: Re: an array[count] in octave ?
Date: Tue, 27 Jan 2009 14:13:28 +0000 (GMT)

hello,

it succeeds.

best regards


--- Jaroslav Hajek <address@hidden> schrieb am Di, 27.1.2009:
Von: Jaroslav Hajek <address@hidden>
Betreff: Re: an array[count] in octave ?
An: address@hidden
Datum: Dienstag, 27. Januar 2009, 14:47

On Tue, Jan 27, 2009 at 2:03 PM, Allahyari Rahim <address@hidden> wrote:
> or . in c
>
> double array[Num];
>
> int total =0;
>
>
> int Count = MyFunction( context, array, Num);
> while ( lCount > 0 )
> {
> int ix=0;
> while ( ix < Count)
> {
> max = max < array[ix] ? array[ix] : max;
> total++;
> ix++;
> }
> Count = MyFunction( context, array, Num);
>
> }
>
> thanks
>
>

Okay, no problem. If you intend to use array as a raw pointer, then
your best option is
probably something like:

.. prologue ...

Matrix mx_object (Num, 1);
double *array = mx_object.fortran_vec (); // now array is a raw C pointer

... do whatever you need ...

// return value from the DLD function
retval = mx_object;

cheers

--
RNDr. Jaroslav Hajek
computing expert
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]