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)
>> 

  

 

你可能感兴趣的:(MATLAB学习(八)神经网络拟合工具箱 Neural Net Fitting使用示例)