is C compatible?

S

seagles

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?

Thankyou!!!!!!!!!!
 
U

Umesh

seagles said:
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.
Plz get me code
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.
it can be done .
I am not too familiar with C programming. Would it increase processing
time and by able to perform fft etc?
By seeing code we can say about performance.
Thankyou!!!!!!!!!!
 
M

Michael Mair

seagles said:
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
 
N

Nudge

Michael said:
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.

I agree with Michael's suggestion:
http://www.gnu.org/software/gsl/
http://lists.gnu.org/mailman/listinfo/help-gsl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top