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; % Here if I want change D into 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*xProfit_S_Q =Ps_Q*x + (P_r-c).*S_L0-I_L0*gProfit_S_R =Ps_R*x+(1-theta)*P_r*S_N0+(P_r-c).*S_L0-I_L0*g
Here If I want Change D = 150 to For D = 1:1:300, How should I change the folloing code?
Best Answer