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;
Ps_B = ((1-theta)*P_r*g+P_r*c-c*c)/(g+c);
Ps_Q = (P_r*c-c*c)/(g+c);
Ps_R = (theta*P_r*c-c*c)/(g+c);
D =150; % 如果這兒的D 我想改為For D= 1:1:300,后面的代碼該如何修改
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*x + (1-theta)*P_r*S_N0 + (P_r-c)*S_L0 - I_L0*g-(1-theta)*P_r*x
Profit_S_Q =Ps_Q*x + (P_r-c).*S_L0-I_L0*g
Profit_S_R =Ps_R*x+(1-theta)*P_r*S_N0+(P_r-c).*S_L0-I_L0*g
如果這兒的D 我想改為For D= 1:1:300,后面的代碼該如何修改
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/181280.html
標籤:非技術區
