how to share matlab functions without code

I would like to share my matlab functions with other matlab developers. These should not be able to access my functions. I want that they only have access to the main functions. All called subfunctions should remain hidden. Like a compiled dll.
Please, Is there any way?

3 件のコメント

Adam
Adam 2018 年 10 月 2 日
If you have the Matlab compiler you can compiler them into a dll. You could also convert them to mex and create a C++ dll, but that would be a lot of work manually.
Bommel
Bommel 2018 年 10 月 3 日
編集済み: Bommel 2018 年 10 月 3 日
Yes, i have a Matlab compiler.
  1. What is faster, dll or mex?
  2. Could I use a mex-file direct in Matlab?
  3. Do you mean
codegen -config:dll my_function
Adam
Adam 2018 年 10 月 4 日
I haven't actually needed to use the option myself. Matlab Compiler includes a Library Compiler. I use the Application Compiler app, I never use the command line compilation so I don't know what the commands would be for compiling whatever Library Compiler creates.
Matlab Coder is another option, which can create dlls or mex files, either of which can be used back in Matlab. I have used it to create .mexw64 files from Matlab code, but not dlls. These are directly callable from Matlab. dlls need a bit more work to use in Matlab, e.g. https://uk.mathworks.com/help/matlab/ref/loadlibrary.html I have no idea which is faster though. You can create both using Coder and test the speed.

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

回答 (1 件)

Bruno Luong
Bruno Luong 2018 年 10 月 2 日
編集済み: Bruno Luong 2018 年 10 月 2 日

0 投票

help pcode
you might also put all the subfunctions in a single file together with the main file. Admittedly this would be a mess to maintain, but it's price you must pay to hide your code.

1 件のコメント

Bommel
Bommel 2018 年 10 月 3 日
Thanks but that is very complicated. Or is there an automatism that copies all functions into one file.

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

カテゴリ

ヘルプ センター および File ExchangeGet Started with MATLAB Compiler SDK についてさらに検索

製品

リリース

R2015b

タグ

質問済み:

2018 年 10 月 2 日

コメント済み:

2018 年 10 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by