seagles wrote:
Hello!
I have some code that is currently run in Matlab which analyses a LONG
dataset (like 6MB) and needs to perform Fourier transforming and other
matrix manipulations on it.
The problem is Matlab keeps running out of virtual memory and is SO
slow, so i was hoping to run/convert the script into a different
program.
I am not too familiar with C programming. Would it increase processing
time and by able to perform fft etc?
Performance is not an issue of the C programming language
itself.
1) Not exactly topical: Do _not_ use the mexFunction() approach
for your program but export your data to a file, using Matlab's
maximum precision. Close Matlab. Run your program, written in
whatever language. Read from the file, write to another. Matlab
is a memory hog and you probably can do better with respect to
the default memory usage (not necessarily w.r.t. algorithmic
memory usage) if you do it right.
Another thing: there is the -nojvm option which may save enough
if you need only a little bit more memory.
2) If you want to use C, then use a library to do your stuff.
If you are not "too familiar" with C, you will otherwise shoot
yourself in the foot. Apart from being not as efficient as
Matlab itself, if you do not have a good grasp on algorithms
and data structures.
Suggestion: Have a look at the Gnu Scientific Library. If it
seems able to do what you need, ask in their mailing list. The
last time I asked there, I got good answers. Otherwise, they
may know about a library doing what you need.
Of course, you can search for a library yourself, too.
Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.