没什么矩阵B没有值,新手求解答,求修改!!!
clc,clearload data.txt
[m,n]=size(data)
A=data;
B=[]
syms a b
for a=1:m
for b=1:n
if A(a,b)>0&&A(a,b)<50;
B(a,b)=(A(a,b)-0)*50/50+0
B(a,b)=(A(a,b)-0)*50/40+0
B(a,b)=(A(a,b)-0)*50/50+0
B(a,b)=(A(a,b)-0)*50/2+0
B(a,b)=(A(a,b)-0)*50/35+0
elseif A(a,b)>51&&A(a,b)<100;
B(a,b)=(A(a,b)-51)*50/100+50
B(a,b)=(A(a,b)-51)*50/40+40
B(a,b)=(A(a,b)-51)*50/100+50
B(a,b)=(A(a,b)-51)*50/2+2
B(a,b)=(A(a,b)-51)*50/40+35% (10<t<20)
elseif A(a,b)>101&&A(a,b)<150;
B(a,b)=(A(a,b)-101)*50/325+150
B(a,b)=(A(a,b)-101)*50/100+80
B(a,b)=(A(a,b)-101)*50/100+150
B(a,b)=(A(a,b)-101)*50/10+4
B(a,b)=(A(a,b)-101)*50/40+75 %(20<t<30)
elseif A(a,b)>151&&A(a,b)<200;
B(a,b)=(A(a,b)-151)*50/325+475
B(a,b)=(A(a,b)-151)*50/100+180
B(a,b)=(A(a,b)-151)*50/100+250
B(a,b)=(A(a,b)-151)*50/10+14
B(a,b)=(A(a,b)-151)*50/35+115 %(30<t<40)
elseif A(a,b)>201&&A(a,b)<300;
B(a,b)=(A(a,b)-201)*100/800+800
B(a,b)=(A(a,b)-201)*100/100+280
B(a,b)=(A(a,b)-201)*100/100+350
B(a,b)=(A(a,b)-201)*100/10+24
B(a,b)=(A(a,b)-201)*100/35+150 %(40<t<50)
elseif A(a,b)>301&&A(a,b)<400;
B(a,b)=(A(a,b)-301)*100/500+1600
B(a,b)=(A(a,b)-301)*100/185+565
B(a,b)=(A(a,b)-301)*100/80+420
B(a,b)=(A(a,b)-301)*100/12+36
B(a,b)=(A(a,b)-301)*100/100+250 %(50<t<60)
else A(a,b)>401&&A(a,b)<500;
B(a,b)=(A(a,b)-301)*100/500+2100
B(a,b)=(A(a,b)-301)*100/185+750
B(a,b)=(A(a,b)-301)*100/80+500
B(a,b)=(A(a,b)-301)*100/12+48
B(a,b)=(A(a,b)-301)*100/100+350