Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > is C compatible?

Reply
Thread Tools

is C compatible?

 
 
seagles
Guest
Posts: n/a
 
      02-01-2006
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!!!!!!!!!!

 
Reply With Quote
 
 
 
 
Umesh
Guest
Posts: n/a
 
      02-01-2006

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.
> 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!!!!!!!!!!


 
Reply With Quote
 
 
 
 
Michael Mair
Guest
Posts: n/a
 
      02-01-2006
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.
 
Reply With Quote
 
Nudge
Guest
Posts: n/a
 
      02-01-2006
Michael Mair wrote:

> seagles wrote:
>
>> 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?

>
> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments