my_function_p.c

来自「关于“pMatlab”(from MIT) 工具在Matlab 环境中使用的说明」· C语言 代码 · 共 33 行

C
33
字号
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "matlab.h"
#include "multpkg.h"

/*
 * Function prototype; the MATLAB Compiler creates mlfMy_function
 *  from my_function.m
 */

int main (int argc, char *argv[]) /* Programmer written coded to call
mlfMy_function */
{
  mxArray *my_cpu;
  int rank;

  rank=(int)atoi(argv[1]);

  /* fprintf(stdout, "  rank: %d\r\n", rank); */

  multpkgInitialize();

  my_cpu=mlfScalar(rank);

  /* Call the mlfMy_function function. */
  mlfMy_function(my_cpu);

  multpkgTerminate();

  return(0);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?