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