is C compatible?

Discussion in 'C Programming' started by seagles, Feb 1, 2006.

  1. seagles

    seagles Guest

    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!!!!!!!!!!
     
    seagles, Feb 1, 2006
    #1
    1. Advertising

  2. seagles

    Umesh Guest

    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!!!!!!!!!!
     
    Umesh, Feb 1, 2006
    #2
    1. Advertising

  3. seagles

    Michael Mair Guest

    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.
     
    Michael Mair, Feb 1, 2006
    #3
  4. seagles

    Nudge Guest

    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
     
    Nudge, Feb 1, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ravikanth[MVP]
    Replies:
    1
    Views:
    359
    Jackal
    Jul 22, 2003
  2. J Landeros
    Replies:
    1
    Views:
    353
    Victor Garcia Aprea [MVP]
    Oct 23, 2003
  3. Bucko
    Replies:
    1
    Views:
    370
    Steve C. Orr [MVP, MCSD]
    Nov 3, 2003
  4. Thomas
    Replies:
    1
    Views:
    391
    Shawn B.
    Dec 3, 2003
  5. pantagruel
    Replies:
    0
    Views:
    246
    pantagruel
    Feb 17, 2006
Loading...

Share This Page