博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
mex 1 hello,world
阅读量:4040 次
发布时间:2019-05-24

本文共 285 字,大约阅读时间需要 1 分钟。

1. 新建一个hello.c的文件

//hello.c#include "mex.h"void mexFunction(int nlhs, mxArray *plhs[], 				int nrhs, const mxArray *prhs[]){	mexPrintf("Hello, world!\n");	return;}
2.打开matlab, 转到hello.c文件所在的目录, 然后在命令行输入

mex hello.c

然后我们就可以看到我的目录下面多了一个以mexw64结尾的文件,该文件名就是可供我们使用的命令

3. 在命令行里输入

hello
结果如下:

你可能感兴趣的文章
1053. Path of Equal Weight (30)
查看>>
1073. Scientific Notation (20)
查看>>
1037. Magic Coupon (25)
查看>>
1040. Longest Symmetric String (25) 最长回文子串
查看>>
1090. Highest Price in Supply Chain (25)
查看>>
1063. Set Similarity (25) 并查集
查看>>
1062. Talent and Virtue (25) 排序
查看>>
1093. Count PAT's (25)
查看>>
1070. Mooncake (25)
查看>>
1076. Forwards on Weibo (30)
查看>>
1079. Total Sales of Supply Chain (25)
查看>>
1025. PAT Ranking (25)
查看>>
1048. Find Coins (25)
查看>>
1049. Counting Ones (30)计算个位数出现次数.
查看>>
1059. Prime Factors (25)
查看>>
1089. Insert or Merge (25)
查看>>
1068. Find More Coins (30)
查看>>
相邻两数最大差值练习题
查看>>
拓扑结构相同子树练习题
查看>>
字符串空格替换练习题
查看>>