⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 squaren.c

📁 Matlab经典算法__Arithmetic
💻 C
字号:
#include "mex.h"
#include <math.h>
void squarenumber(double y[],double x[])
{
	y[0]=x[0]*x[0];
	return;
}
void mexFunction(int nlhs,mxArray *plhs[],int nrhs,const mxArray *prhs[])
{
	double *y;
	double *x;
	unsigned int m,n;
	m=mxGetM(prhs[0]);                                                                                                                                                                                                                                                                                                             
	n=mxGetN(prhs[0]);
	plhs[0]=mxCreateDoubleMatrix(m,n,mxREAL);//mxCreateFull???
	y=mxGetPr(plhs[0]);
	x=mxGetPr(prhs[0]);
	squarenumber(y,x);
}

⌨️ 快捷键说明

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