help-octave
[Top][All Lists]
Advanced

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

Re: Question about oct files


From: Muthiah Annamalai
Subject: Re: Question about oct files
Date: Sat, 27 May 2006 17:52:12 -0700 (PDT)

Hi Nogueras,
You can actually use,

DEFUN_DLD(MagicVectors,args, , "Some dynamic vector")
{
int DynamicallyAllocatedSize=randn();
ColumnVector *vec=new ColumnVector( DynamicallyAllocatedSize );

for(i=0;i<DynamicallyAllocatedSize;i++)
  vec->elem(i) = SomeMagicValue(i);

return octave_value(vec);
}

Cheers
Muthu


Guillem Borrell Nogueras <address@hidden> wrote:
Hi

How can I make an oct file return a value allocated runtime? ColumnVector,
Matrix... seem to allocate at compile time.

Thanks in advance

guillem
--
Guillem Borrell Nogueras
WEBSITE
http://torroja.dmt.upm.es:9673/Guillem_Site/
BLOG
http://torroja.dmt.upm.es:9673/Guillem_Borrell/
EMAIL
guillemborrell_at_gmail.com (personal)
guillem_at_torroja.dmt.upm.es (CFD Lab. ETSIA)
_______________________________________________
Help-octave mailing list
address@hidden
https://www.cae.wisc.edu/mailman/listinfo/help-octave


New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.
reply via email to

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