您现在的位置:计算机学习网>> matlab与数字水印>>正文内容

matlab中GUI程序的打包

点击数: 【字体: 收藏 打印文章 查看评论
 

计算机学习网(http://www.haircuthome.com) 欢迎你的访问

matlab中GUI程序的打包

1.首先对Compiler进行适当的配置,方法是在Matlab命令窗口输入:

Mbuild –setup

2.将M文件编译为独立可执行文件的语法是:

>>mcc –m myfunctionname.m

myfunctionname.exe就是最后的可执行文件的名称。

3.将\MATLAB701\toolbox\compiler\deploy\win32中的MCRinstaller.exe安装到要运行该程序的计算机上

4.将编译生成的相相关文件拷贝到同一目录下,运行myfunctionname.ext即可执行程序

5.此时程序会出现command窗口,影响美观。

有人写好了包避免它的出现,下载地址为:http://www.mathworks.com/matlabcentral/fileexchange/3909

注意它的说明文件:

This program will hide the command window of compiled programs in all versions of Microsoft Windows. To use, change the name in the "suppress.ini" file to the name of your MATLAB EXE file, then run "suppress.exe". You may rename "suppress.exe", but you may not rename "suppress.ini" without editing and recompiling the source code. The files "suppress.exe", "suppress.ini", and your EXE file must all be in the same directory. This utility was created using NSIS (http://nsis.sf.net/). The default settings will run the "test.exe" program included in the ZIP file.

需要将suppress.ini内的路径更改,然后执行suppress.exe即可。


作者: 来源: 发布时间:2009年04月24日
相关信息
没有相关内容
用户信息中心
栏目导航
  • 找不到相关分类
  • 本月排行TOP10
  • 还没有任何项目!
  • 计算机学习网
  • 计算机学习网
  • 计算机学习网
  • 计算机学习网
  • 计算机学习网
  • 计算机学习网
  • 计算机学习网
  • 天津工程师范学院