用C寫matlab function
在 Matlab 的 Command Window 輸入 mex -setup #include#include"mex.h" void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { printf("Hello, world.\n"); } 存成 hello.c 在 Command Window 輸入 mex hello.c hello
在 Matlab 的 Command Window 輸入 mex -setup #include#include"mex.h" void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { printf("Hello, world.\n"); } 存成 hello.c 在 Command Window 輸入 mex hello.c hello
留言