How to compile code for other Matlab users
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
Hi, Before embarking in any too difficult task, I would like to understand if it is possible to do the following thing: 1) compile a set of m-files user-created that also include calls to functions from some toolboxes (no particularly fancy things, maybe Java class included only) 2) use the compiled versions of the m-files on another computer that has Matlab installed but not necessarily the toolboxes 3) In practice, i want to use on the 2 machines the same way to call the functions i created, and normally use matlab on the second one.
The guide seems to suggest it is possible, but I cannot figure out the step by step approach. Any help is greatly appreciated. \Regards
0 个评论
回答(3 个)
Kaustubha Govind
2011-4-7
0 个投票
If you are calling into certain toolbox functions in your MATLAB scripts/functions, you need the same toolboxes installed on any other machine to be able to run your functions correctly. If these are third-party toolboxes not restricted by licensing considerations, you can always package your functions with the required toolbox directories and run them elsewhere.
Also, could you please clarify what you mean by "compiling"? Do you mean simply writing MATLAB functions/scripts or actually compiling MATLAB code into binaries using MATLAB Compiler?
0 个评论
Robert Cumming
2011-4-7
Do you want to protect your code from the other user editing? if so you have 2 options
1. Compile using matlab compiler
2. Pcode your m files.
each of these has issues (based on what you describe above)
1. If you compile a dll you cant load that back into Matlab (as far as I remember)
2. Your other computer will need the same toolboxes as you have for this to work.
If you can explain a bit more of what you want to do then it might be a bit more clear how to help you.
0 个评论
Matteo
2011-4-11
0 个投票
2 个评论
Walter Roberson
2011-4-11
If you create a binary, then as far as I _know_ the destination machine does not need a license for the toolboxes you used. I could be wrong on that point.
Robert Cumming
2011-4-11
If you create an exe with the matlab compiler you are correct.
If you create a DLL however Mathworks does not allow a matlab created DLL to be loaded into Matlab (to stop users compiling up toolboxes to use as toolboxes)
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!