an array[count] in octave ?

Jaroslav Hajek highegg at gmail.com
Tue Jan 27 03:37:06 CST 2009


On Tue, Jan 27, 2009 at 10:25 AM, Allahyari Rahim <elfar63 at yahoo.de> wrote:
> hell,
>
> How can i declare an array [Num]
>
>
>
> int Num=1000;
>
> double array[Num]
>
>
>
>  In octave function
>
>
>
> DEFUN_DLD(MyOctave, args , , "")
>
> {
>
>             octave_value retval;
>
>            …..
>
>            …..
>
>             int count=MyFunction (array, Num);
>
>             …..
>
>              return retval;
>
> }
>
> best regards
>
>
> _______________________________________________
> Help-octave mailing list
> Help-octave at octave.org
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
>

A dynamic array is created by
Array<double> array (num);
and indexed by round braces ().
Octave also provides a mechanism for efficient temporary buffers, i.e.
raw C arrays that only exist in the current scope, via the
OCTAVE_LOCAL_BUFFER macro.

regards

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



More information about the Help-octave mailing list