[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
C++ using Octave headers, mkoctfile
From: |
Steve C. Thompson |
Subject: |
C++ using Octave headers, mkoctfile |
Date: |
Fri, 18 Feb 2005 08:28:10 -0800 |
User-agent: |
Mutt/1.3.28i |
Dear all,
I'm running Monte Carlo simulations and would like to convert the core
parts of my code to an .oct file by using mkoctfile on C++ code using
the Octave headers. Unfortunately, I don't have much experience with
C/C++ and the documentation is very limited. The *Coda cookbook and
tutorial have helped, but I need more examples -- preferably a resource
that explains how to do the majority of the Octave commands with the C++
equivalent. I suppose an experienced programmer could view the .h
source files or use the Doxygen website and get all he needs, but it is
all very cryptic for me.
I have learned how to generate random variables -- a big step. But I'm
currently stuck on building a complex matrix (or returning a complex
number). For example, what would the C++ code be to generate:
n=[0:29]';
W=zeros(30,30);
for k=1:30
W(:,k)=exp(j*2*pi*k*n/30);
end
(If you run this with plot(W), you get a nice graphic.)
Thanks in advance!
Steve Thompson
San Diego
-------------------------------------------------------------
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
-------------------------------------------------------------
- C++ using Octave headers, mkoctfile,
Steve C. Thompson <=