MATLAB学习(八)神经网络拟合工具箱 Neural Net Fitting使用示例

>> x=-3:0.2:5;y=x.^2-1;xn=-2:0.1:7;
>> 

  

 

 

>> %多元函数(z=sin(x2+y2)/(x2+y2))拟合
>> [X,Y]=meshgrid(-2:0.2:2);Z=sin(X.^2+Y.^2)./(X.^2+Y.^2+eps);
>> SX=[X(:),Y(:)];SZ=Z(:); [nX,nY]=meshgrid(-3:0.1:3);NX=[nX(:),nY(:)];
>> 

  

>> NZ=sim(net1,NX');ZZ=reshape(NZ,61,61);surf(nX,nY,ZZ)
>> 

  

 

posted on 2019-07-09 14:09  蔡军帅  阅读(8890)  评论(0编辑  收藏  举报