Re: [eigen] HELP : matlab data import

[ Thread Index | Date Index | More Archives ]


you can try Andrea Arteagas library matfile from

I don't know if the current version is stable. If not I can upload the
version that I'm already using for some time.

Loading matrices with that is easy-peasy (an excerpt from my code):

void loadMatlabMatrix(const string &strFilename, const string &strVar,
MATSPARSE &loadedMatrix)
    InputDevice myFile(strFilename);
    EigenSparseIWrapper<std::complex<double> > wrapperSparse(loadedMatrix);
    myFile.readArray(strVar, wrapperSparse);

void loadMatlabRHS(const string &strFilename, const string &strVar,
    InputDevice myFile(strFilename);
    EigenDenseIWrapper<std::complex<double> > wrapperDense(loadedRHS);
    myFile.readArray(strVar, wrapperDense);


Am 27.06.2012 12:02, schrieb Gaurav Gupta:
> Hello,
> How can I import data from matlab ".mat" file. My data is complex valued
> matrices.
> Thanks
> Gaurav

Attachment: signature.asc
Description: OpenPGP digital signature

Mail converted by MHonArc 2.6.19+