[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compiling .m files
From: |
Hein Zelle |
Subject: |
Re: compiling .m files |
Date: |
Wed, 13 Nov 2002 02:47:30 +0100 |
User-agent: |
Mutt/1.4i |
Mike Miller wrote:
> > An octave m-file compiler is one of the wish-list items out there, along
> > with a block-diagram simulation tool, symbolic math (some work done here
> > I think), etc.
>
>
> I'm not quite clear on the original question. I believe that Octave, like
> MATLAB, compiles .m functions in memory the first time they are executed.
> The 'whos' command shows a list of compiled functions...
Well, you answered one of my questions there: Octave clearly compiles
something in memory. What I meant though, was if there was a way to
make faster code from .m files by compiling it beforehand, like the
process of generating .oct files from C++ files. I guess you need an
Octave-to-C++ translator for that though, and that would be pretty
hard to write, I imagine. I'll stick to writing small functions that I
use a lot in C++, and that will have to be good enough.
Unrelated question: is there a way to do the following without using a
for loop?
a = [1, 2; 3, 4];
b = mean(a);
for r = 1:2
anomaly(r,:) = a(r,:) - b
endfor
I would like to use the : notation to indicate that I want the row
vector b to be subtracted from each row of a, but i can't figure out
how to do it.
Hein Zelle
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<
Unix is user friendly. It's just very particular about who
it's friends are.
Hein Zelle address@hidden
http://www.icce.rug.nl/~hein
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<
-------------------------------------------------------------
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
-------------------------------------------------------------