testsincplot.c
来自「《精通matlab与c++混合编程》的光盘内容」· C语言 代码 · 共 26 行
C
26 行
/* $Revision: 1.3 $ */
// Automatically generated by MATLAB Project Wizard version 1.0
#include "matlab.h"
#include "libsincplot.h"
#include "matrix.h"
int main()
{
mxArray * pArrayIn;
mxArray * pArrayOut;
int i=0;
libsincplotInitialize();
pArrayIn = mxCreateDoubleMatrix(1,1,mxREAL);
*(mxGetPr(pArrayIn))=10;//输入参数
mlxSincplot(1,&pArrayOut,1,&pArrayIn);
for(i=0;i<mxGetNumberOfElements(pArrayOut);i++)
{
printf("%6.2f\n",*(mxGetPr(pArrayOut)+i));
}
mxDestroyArray(pArrayIn);
mxDestroyArray(pArrayOut);
libsincplotTerminate();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?