an array[count] in octave ?

Allahyari Rahim elfar63 at yahoo.de
Tue Jan 27 08:13:28 CST 2009


hello,

it succeeds.

best regards


--- Jaroslav Hajek <highegg at gmail.com> schrieb am Di, 27.1.2009:
Von: Jaroslav Hajek <highegg at gmail.com>
Betreff: Re: an array[count] in octave ?
An: elfar63 at yahoo.de
Datum: Dienstag, 27. Januar 2009, 14:47

On Tue, Jan 27, 2009 at 2:03 PM, Allahyari Rahim <elfar63 at yahoo.de> 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



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090127/73a8629b/attachment.html 


More information about the Help-octave mailing list