How to efficiently turn octave code to matlab.
古いコメントを表示
Hi there I'new first time matlab just buy it. But I have lots of octave codes. Pls help me with tips as per efficiently turn those codes to matlab. If not posible is like having buying matlab no purpose. Thanks!
5 件のコメント
per isakson
2019 年 10 月 12 日
編集済み: per isakson
2019 年 10 月 12 日
See oct2ml by Ben Barrowes. Converts octave style m-files to matlab style m-files and MATLAB Programming/Differences between Octave and MATLAB
Do you have a testsuite for your Octave code?
Rik
2019 年 10 月 12 日
As long as you avoid documented differences between Octave and Matlab, you should be able to run Octave code on Matlab without any modification. Things to watch out for are loading of packages, comments not written with a % symbol, and the endif and endfunction keywords. Those are probably the most commonly used incompatible constructs.
Also, you should be aware that Octave ignores nesting of functions, so if you accidentally use them, the effect may be different from what you expect.
Beaker
2022 年 11 月 28 日
undocumented: computing platform descriptors returned by compute.m in OCTAVE are different from what is returned by MATLAB. Does anyone have an "equivalence list?"
Walter Roberson
2022 年 11 月 28 日
Beaker, are you referring to the "computer" function?
Just to show the difference:
[comp, maxsize, endian] = computer (), arch = computer ("arch")
And this is the output on my installed copy of Octave:
comp = x86_64-w64-mingw32
maxsize = 9.2234e+18
endian = L
arch = mingw32-x86_64
@Beaker I don't know why the descriptors are different. That is a question for the Octave developers. I do know this has been the case for a while now: Octave 4 also returns this style of output.
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Octave についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!