clc
clear
close all
load maydata.mat
load maynet.mat
input_test = [num(:,1:2) ones(9,1)*mean(num(:,3)) ones(9,1)*mean(num(:,4))]';
inputn_test=mapminmax('apply',input_test,inputps);
an=sim(net,inputn_test);
BPoutput=(mapminmax('reverse',an,outputps));
[x1,x2,z1] = griddata(num(:,1),num(:,2),BPoutput',linspace(min(num(:,1)),max(num(:,1)),100),linspace(min(num(:,2)),max(num(:,2)),100)','cubic');
zx1 =0;
for ii = 1:100
for jj = 1:100
if zx1<z1(ii,jj)
zx1 = z1(ii,jj);
mx1 = x1(ii,jj);
my1 = x2(ii,jj);
end
end
end
figure
surfc(x1,x2,z1)
shading interp
colormap jet
hold on
plot3(mx1,my1,zx1,'ro')
xlabel('A芸苔素内酯')
ylabel('B脱落酸')
zlabel('叶绿素总含量')
view([40 24])
input_test = [num(:,1) ones(9,1)*mean(num(:,2)) num(:,3) ones(9,1)*mean(num(:,4))]';
inputn_test=mapminmax('apply',input_test,inputps);
an=sim(net,inputn_test);
BPoutput=(mapminmax('reverse',an,outputps));
[x1,x3,z2] = griddata(num(:,1),num(:,3),BPoutput',linspace(min(num(:,1)),max(num(:,1)),100),linspace(min(num(:,3)),max(num(:,3)),100)','cubic');
zx2 =0;
for ii = 1:100
for jj = 1:100
if zx2<z2(ii,jj)
zx2 = z2(ii,jj);
mx2 = x1(ii,jj);
my2 = x3(ii,jj);
end
end
end
figure
surfc(x1,x3,z2)
shading interp
colormap jet
hold on
plot3(mx2,my2,zx2,'ro')
xlabel('A芸苔素内酯')
ylabel('CJ-15MES')
zlabel('叶绿素总含量')
input_test = [num(:,1) ones(9,1)*mean(num(:,2)) ones(9,1)*mean(num(:,3)) num(:,4)]';
inputn_test=mapminmax('apply',input_test,inputps);
an=sim(net,inputn_test);
BPoutput=(mapminmax('reverse',an,outputps));
[x1,x4,z3] = griddata(num(:,1),num(:,4),BPoutput',linspace(min(num(:,1)),max(num(:,1)),100),linspace(min(num(:,4)),max(num(:,4)),100)','cubic');
zx3 =0;
for ii = 1:100
for jj = 1:100
if zx3<z3(ii,jj)
zx3 = z3(ii,jj);
mx3 = x1(ii,jj);
my3 = x4(ii,jj);
end
end
end
figure
surfc(x1,x3,z3)
shading interp
colormap jet
hold on
plot3(mx3,my3,zx3,'ro')
xlabel('A芸苔素内酯')
ylabel('D硫酸锌')
zlabel('叶绿素总含量')
%%
input_test = [ones(9,1)*mean(num(:,1)) num(:,2) num(:,3) ones(9,1)*mean(num(:,4)) ]';
inputn_test=mapminmax('apply',input_test,inputps);
an=sim(net,inputn_test);
BPoutput=(mapminmax('reverse',an,outputps));
[x2,x3,z4] = griddata(num(:,2),num(:,3),BPoutput',linspace(min(num(:,2)),max(num(:,2)),100),linspace(min(num(:,3)),max(num(:,3)),100)','cubic');
zx4 =0;
for ii = 1:100
for jj = 1:100
if zx4<z4(ii,jj)
zx4 = z4(ii,jj);
mx4 = x2(ii,jj);
my4 = x3(ii,jj);
end
end
end
figure
surfc(x2,x3,z4)
shading interp
colormap jet
hold on
plot3(mx4,my4,zx4,'ro')
xlabel('B脱落酸')
ylabel('CJ-15MES')
zlabel('叶绿素总含量')
input_test = [ones(9,1)*mean(num(:,1)) num(:,2) ones(9,1)*mean(num(:,3)) num(:,4) ]';
inputn_test=mapminmax('apply',input_test,inputps);
an=sim(net,inputn_test);
BPoutput=(mapminmax('reverse',an,outputps));
[x2,x4,z5] = griddata(num(:,2),num(:,4),BPoutput',linspace(min(num(:,2)),max(num(:,2)),100),linspace(min(num(:,4)),max(num(:,4)),100)','cubic');
zx5 =0;
for ii = 1:100
for jj = 1:100
if zx5<z5(ii,jj)
zx5 = z5(ii,jj);
mx5 = x2(ii,jj);
my5 = x4(ii,jj);
end
end
end
figure
surfc(x2,x4,z5)
shading interp
colormap jet
hold on
plot3(mx5,my5,zx5,'ro')
xlabel('B脱落酸')
ylabel('D硫酸锌')
zlabel('叶绿素总含量')
input_test = [ones(9,1)*mean(num(:,1)) ones(9,1)*mean(num(:,3)) num(:,3) num(:,4) ]';
inputn_test=mapminmax('apply',input_test,inputps);
an=sim(net,inputn_test);
BPoutput=(mapminmax('reverse',an,outputps));
[x3,x4,z6] = griddata(num(:,3),num(:,4),BPoutput',linspace(min(num(:,3)),max(num(:,3)),100),linspace(min(num(:,4)),max(num(:,4)),100)','cubic');
zx6 =0;
for ii = 1:100
for jj = 1:100
if zx6<z6(ii,jj)
zx6 = z6(ii,jj);
mx6 = x3(ii,jj);
my6 = x4(ii,jj);
end
end
end
figure
surfc(x3,x4,z6)
shading interp
colormap jet
hold on
plot3(mx6,my6,zx6,'ro')
xlabel('CJ-15MES')
ylabel('D硫酸锌')
zlabel('叶绿素总含量')
x = 1:0.1:3;
inp = zeros(16000,4);
t=1;
for ii = 1:21
for jj = 1:21
for hh = 1:21
for ih = 1:21
inp(t,:) = [ x(ii) x(jj) x(hh) x(ih)];
t = t+1;
end
end
end
end
inputn_test=mapminmax('apply',inp',inputps);
an=sim(net,inputn_test);
BPoutput1=(mapminmax('reverse',an,outputps));
[BPmax,mx] = max(BPoutput1);
BPmax = BPmax+me
xyz = inp(mx,:)
神经网络机器学习智能算法画图绘图
- 粉丝: 2801
- 资源: 659