is C compatible?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • seagles

    #1

    is C compatible?

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

  • Umesh

    #2
    Re: is C compatible?


    seagles wrote:[color=blue]
    > 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!!!!!!! !!![/color]

    Comment

    • Michael Mair

      #3
      Re: is C compatible?

      seagles wrote:[color=blue]
      > 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?[/color]

      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.

      Comment

      • Nudge

        #4
        Re: is C compatible?

        Michael Mair wrote:
        [color=blue]
        > seagles wrote:
        >[color=green]
        >> 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?[/color]
        >
        > 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.[/color]

        I agree with Michael's suggestion:

        Mailing list for the GNU Scientific Library mailing list. Post here for GSL help and general questions.

        Comment

        Working...