Home > database >  How to change the numerical calculation to matrix calculation
How to change the numerical calculation to matrix calculation

Time:10-20

 CLC. 
Clear all;
Profit_S_B=[];
Profit_S_Q=[];
Profit_S_R=[];
Q1=100;
Q_01=50;
P_r=400;
C=20;
G=50;
(x=norminv (g/g + c), 100, 30);
Theta=0.8351;
P_r Ps_B=((1 - theta) * * g + P_r * c - c * c)/(g + c);
Ps_Q=(P_r * c - c * c)/(g + c);
Ps_R=(P_r theta * * c - c * c)/(g + c);
D=150; If % D here I'd like to change to the For D=1:1:30 0, how to modify the code behind
S_N0=min (x, D);
I_N0=Max (0, (D - x));
S_L0=min ((D - S_N0), (Q1 + q_01 - x));
I_L0=Max (0, (D - Q1 - q_01));
Profit_S_B=Ps_B P_r * x + (1 - theta) * * S_N0 + (P_r - c) * S_L0 - I_L0 P_r * g - (1 - theta) * * x
Profit_S_Q=Ps_Q * x + (P_r - c). * g * S_L0 - I_L0
Profit_S_R=Ps_R P_r * x + (1 - theta) * * S_N0 + (P_r - c). * g * S_L0 - I_L0

If the D here I'd like to change to the For D=1:1:30 0, the code behind the how to modify
  • Related