Is it possible to access the lines of code from a pre built command

2 ビュー (過去 30 日間)
Ahmed Abdulla
Ahmed Abdulla 2020 年 6 月 9 日
コメント済み: Steven Lord 2020 年 6 月 9 日
I wanted to ask if it was possible to see what lines of code run when a pre built function or command gets run in matlab.

採用された回答

Rik
Rik 2020 年 6 月 9 日
You mean a builtin Matlab function?
That may be possible, but since it is bound by copyright you can't actually use that knowledge for a lot of purposes. (contact a lawyer if you would like to use that code/knowledge)
Some internal functions are not implemented in the Maltab language, but use compiled C code (or other languages, I don't work for Mathworks, so I don't know what they use internally). In that case it would only be possible to see what the code is doing by decompiling, which is likely either difficult, or illegal, or both.
  2 件のコメント
Ahmed Abdulla
Ahmed Abdulla 2020 年 6 月 9 日
may i please know how to access those lines of code, i just want to ensure that a specifc variable is calculated in the way i want.
Steven Lord
Steven Lord 2020 年 6 月 9 日
That depends. Which function?
As Rik said, some functions are implemented as MATLAB program files. Those you can see.
edit bench.m
Others are implemented as built-in functions, compiled into the executable and/or libraries. If you want to see those your first step is to go here or perhaps to talk to your dedicated sales representative about how much it would cost to see the code under a non-disclosure agreement.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by