| Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) | 
![]()  | 
	
| 
	 | 
| 		
			
			 | 
		#1 | 
| 
			
			 初级会员 
			
			
			
			注册日期: 2009-03-31 
				
				年龄: 40 
				
					帖子: 1
				 
				
				
				声望力: 0 ![]()  | 
	
	
	
		
		
			
			 
			
			我源程序如下:  
		
		
		
		
		
		
		
	#define inputNum 7 #define outputNum 2 #define hiddenNum inputNum*2+1 int main() { int i=0,j; float input[inputNum]={1,2,4,5,6,7,4}; mxArray *result=NULL,*A=NULL; char buffer[1001]; char *str; Engine *ep; if (! (ep=engOpen (NULL)))//启动Matlab引擎 { cout<<"不能启动MATLAB引擎"<<endl; exit (-1); } A= mxCreateDoubleMatrix(1, inputNum, mxREAL); memcpy((char *) mxGetPr(A), (char *) input, inputNum*sizeof(double)); engOutputBuffer(ep, buffer, 1000); engEvalString(ep,"load('bptest.mat','-mat');"); engEvalString(ep,"y=sim(Net,A');"); result=engGetVariable(ep,"y"); double *output=mxGetPr(result); engClose (ep);//关闭引擎 mxDestroyArray (A); return 0; } 不知道是哪儿的问题,不知道A的值有没有传到工作空间中,请高手指点啊:lovely: !  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
	
	
		
  | 
	
		 | 
			 
			相似的主题
		 | 
	||||
| 主题 | 主题作者 | 版面 | 回复 | 最后发表 | 
| 关于lsim函数 谢谢 | handsomelufeng | MATLAB论坛 | 2 | 2009-04-19 18:11 | 
| 【求助】用Matlab的simulink仿真码分多址CDMA通信系统 | teleofree | MATLAB论坛 | 4 | 2009-04-14 10:00 | 
| crossplot->定义区域->取出点 | woyao3002 | MATLAB论坛 | 0 | 2008-11-15 21:24 | 
| 含有开方,平方的方程如果用matlab求解,并在坐标图上画出曲线? | ryan_ff | MATLAB论坛 | 0 | 2008-04-18 04:47 |