help-octave
[Top][All Lists]
Advanced

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

Re: calling a DLD function from another DLD function


From: Carlo de Falco
Subject: Re: calling a DLD function from another DLD function
Date: Wed, 1 Feb 2006 17:02:16 +0100

> It is about as efficient as calling a .oct file function from Octave.
>
> If the functions are defined in the same .oct file, then you can use a
> more direct route.  But if they are not in the same file, you may have
> unpredictible results, so it is best to use feval to handle the
> function (.oct file) lookup.
>
> jwe
>

John,
Thank you very much for your reply!
If I understand correctly this is not efficient
enough for my case.
Probably I am just following a completely wrong
approach, let me explain in more detail what I need to do:

I have a set of functions in m-files, say fa.m, fb.m and fc.m
that I want to convert to c++ for better performance.

they something look like

-----
function out = fa(in)

  for ii=1:bigumber
    for jj=1:bigumber
      -- compute some stuff --
      out(ii,jj) = fb(somestuff)
    end
  end

endfunction
-----
function out = fb(in)

  for ii=1:bigumber
      -- compute some stuff --
      out += fc(somestuff)
  end

endfunction
-----

and I would like fa, fb and fc all to be available
as commands from the octave prompt.

Probably my approach of making a .oct file
for each function juast makes no sense.

Do you have any alternatives?
Carlo



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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