如何从 .m 文件创建可执行的 .exe 文件 [英] How to create an executable .exe file from a .m file

查看:19
本文介绍了如何从 .m 文件创建可执行的 .exe 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有办法从 MATLAB 中的.m"文件创建一个.exe"文件,这样它就可以在没有 MATLAB 的机器上运行(就像它可以在 C 中完成一样,C++).

I was wondering if there is a way to create a '.exe' file from ' .m' file in MATLAB, such that it can be run in machine which does not have MATLAB (like it can be done in C, C++).

我知道编写 MATLAB 函数是一种方法,但我不确定它是否可以在没有 MATLAB 的机器上运行.

I know writing a MATLAB function is one way, but I am not sure if it can run in machine without MATLAB.

此外,我想隐藏我的代码,只创建一个可由用户使用自己的数据文件运行的脚本.

Also I would like to hide my code and just create a script which can be run by a user using his own data files.

推荐答案

Matlab 编译器是执行此操作的标准方法.mcc 是命令.运行程序需要Matlab Runtime;我不确定它是否可以与可执行文件直接集成.

The Matlab Compiler is the standard way to do this. mcc is the command. The Matlab Runtime is required to run the programs; I'm not sure if it can be directly integrated with the executable or not.

这篇关于如何从 .m 文件创建可执行的 .exe 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆