How to read a Structure from a matlab file to a structure in Vc++ 2003

Discussion in 'C++' started by meisterbartsch, Jun 12, 2007.

  1. Hi NG,

    I want to load a structure from a matlab file (*.mat) into vc++. In
    the best case I would have a matching structure in vc++ to acces the
    data of the loaded matlab structure.

    Model.torque.ratio=[1,0.5,0.2,0.1,0], in Matlab

    should be

    vector<double> Model.torque.ratio;

    in VC++;


    Therefor i tried to use http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=8187&objectType=FILE
    , Is there anybody who wrote a function to create a struct out of
    matlab data?

    Maybe there are other ways to read mat files in vc++?

    Best regards

    Patrick
    meisterbartsch, Jun 12, 2007
    #1
    1. Advertising

  2. meisterbartsch

    red floyd Guest

    Re: How to read a Structure from a matlab file to a structure inVc++ 2003

    meisterbartsch wrote:
    > I want to load a structure from a matlab file (*.mat) into vc++. In
    > the best case I would have a matching structure in vc++ to acces the
    > data of the loaded matlab structure.
    >
    > [redacted]
    >
    > Is there anybody who wrote a function to create a struct out of
    > matlab data?


    We had to do it at my previous job, and no, I can't share the code, the
    previous employer owns the rights, I don't have permission (or even
    remember the specifics).

    That said, read the MATLAB docs. All the info you need is there.
    red floyd, Jun 12, 2007
    #2
    1. Advertising

  3. On 12 Jun., 17:39, red floyd <> wrote:
    > meisterbartsch wrote:
    > > I want to load a structure from a matlab file (*.mat) into vc++. In
    > > the best case I would have a matching structure in vc++ to acces the
    > > data of the loaded matlab structure.

    >
    > > [redacted]

    >
    > > Is there anybody who wrote a function to create a struct out of
    > > matlab data?

    >
    > We had to do it at my previous job, and no, I can't share the code, the
    > previous employer owns the rights, I don't have permission (or even
    > remember the specifics).
    >
    > That said, read the MATLAB docs. All the info you need is there.


    Thank you for your quick answer,

    I am going to check the docs tomorrow.

    Patrick
    meisterbartsch, Jun 12, 2007
    #3
    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. jose flanigan
    Replies:
    0
    Views:
    402
    jose flanigan
    Jul 3, 2003
  2. siki
    Replies:
    0
    Views:
    954
  3. dd
    Replies:
    1
    Views:
    298
    Richard Heathfield
    Apr 6, 2006
  4. Luna Moon
    Replies:
    16
    Views:
    1,334
    Giovanni Gherdovich
    Aug 8, 2008
  5. Alex Dowad
    Replies:
    4
    Views:
    271
    Michel Demazure
    May 1, 2010
Loading...

Share This Page