필터 지우기
필터 지우기

Import .mat File out of Octave into Matlab

조회 수: 22 (최근 30일)
MarionJ
MarionJ 2017년 4월 3일
댓글: MarionJ 2017년 4월 4일
Hello
I have been in contact with Mathworks Support Andreas Goser about importing a .mat file out of Octave into Matlab. He approved of handling this question even though there is a connection with using open source.
The question is, How can I import a .mat file which was compiled in Octave into Matlab? I Need to perform a functionfit on the Basis of measured data in Octave, since I do not have the optim-package in Matlab, and want to Import the function Parameters into Matlab.
Thank you in advance for help.
  댓글 수: 2
Jan
Jan 2017년 4월 3일
I do not understand the question. You can import a MAT file simply by using load. What is the "optim-package in Matlab"? To import function parameters an binary file might be much easier. So what exactly do you want to solve?
MarionJ
MarionJ 2017년 4월 3일
It is not possible to load a .mat file which was created in Octave. Is it? It did not work with me at least... I cannot use lsqcurvefit, since I do not have the respective package in Matlab. So I perform the functionfit with lsqcurvefit in Octave and want to Import the function Parameters into Matlab. It would be so simple with a .mat file...

댓글을 달려면 로그인하십시오.

채택된 답변

Jan
Jan 2017년 4월 3일
편집: Jan 2017년 4월 3일
I do not know Octave. So please explain in which format "the function parameters" are available in Octave. If this is a number of double values, a binary file is trivial.
Nevertheless, the documentation (found by Google "Ocatve write MAT file") seems to imply, that Octave can write v4, v6 and v7 MAT files:
Simply try a save -v7 in Octave and a load in Matlab.
[EDITED] Sorry, I did not see Stephen's answer before I've submitted this one.
  댓글 수: 1
MarionJ
MarionJ 2017년 4월 4일
Saving with save -v7 in Octave and simply load in Matlab did not work. Saving with save -ASCII and simply load in Matlab however did work. A 'double' array is returned. Saving with save -mat7-binary or save -v7 and loading with load '-mat' also works, but a struct is created in Matlab. This corresponds to the load documentation in Matlab: https://de.mathworks.com/help/matlab/ref/load.html Thank you for the hint.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Octave에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by