如何用Matlab画含积分函数式子的图形
symsx1Q_N;p=125;w=80;w2=85;c=35;c2=50;v=20;h=10;a=130;b=1;rate=[101228221810];demand=...
syms x1 Q_N;
p = 125; w = 80; w2 = 85; c = 35; c2 = 50; v = 20; h = 10; a = 130; b = 1;
rate = [10 12 28 22 18 10];
demand = 5500:200:6500;
r = sum(rate);
AVG = rate * demand'/r
STD = sqrt(rate * (demand.^2)'/r - AVG^2)
n = (p + 2 * h - c)/(p - v + 2 * h);
y(p) = a * p ^ (- b);
Q_N = 4000:500:8000;
S1 = (1 -normcdf(Q_N/y(p),AVG,STD)) .* Q_N
f_x=(exp(-(x1-AVG)^2/(2*STD^2)))/(sqrt(2*pi)*STD);
S2 = int(x1 * f_x,0,Q_N/y(p))
Es = S1 + S2;
es = eval(Es)
Eb = int((Q_N - x1) * f_x,0,Q_N/y(p));
eb=eval(Eb)
El = AVG - es
if El > 0
el = El
else
el = 0
end
Er = - w * Q_N + p * Es + v * Eb - h * el;
er=eval(Er)
ew = (w - c) * Q_N - h * el
e = er + ew
plot(Q_N,er)
hold on
plot(Q_N,ew)
hold on
plot(Q_N,e)
是新手,不太懂,要画随着Q_N取值变化,er,ew,e的相应变化图像。以上程序调试出现:
Error using mupadmex
Error in MuPAD command: The argument is invalid. [Dom::Interval::new]
Error in sym/int (line 124)
rSym = mupadmex('symobj::intdef',f.s,x.s,a.s,b.s,options);
恳请大神指教。谢谢!!!
(打酱油的外行请绕道) 展开
p = 125; w = 80; w2 = 85; c = 35; c2 = 50; v = 20; h = 10; a = 130; b = 1;
rate = [10 12 28 22 18 10];
demand = 5500:200:6500;
r = sum(rate);
AVG = rate * demand'/r
STD = sqrt(rate * (demand.^2)'/r - AVG^2)
n = (p + 2 * h - c)/(p - v + 2 * h);
y(p) = a * p ^ (- b);
Q_N = 4000:500:8000;
S1 = (1 -normcdf(Q_N/y(p),AVG,STD)) .* Q_N
f_x=(exp(-(x1-AVG)^2/(2*STD^2)))/(sqrt(2*pi)*STD);
S2 = int(x1 * f_x,0,Q_N/y(p))
Es = S1 + S2;
es = eval(Es)
Eb = int((Q_N - x1) * f_x,0,Q_N/y(p));
eb=eval(Eb)
El = AVG - es
if El > 0
el = El
else
el = 0
end
Er = - w * Q_N + p * Es + v * Eb - h * el;
er=eval(Er)
ew = (w - c) * Q_N - h * el
e = er + ew
plot(Q_N,er)
hold on
plot(Q_N,ew)
hold on
plot(Q_N,e)
是新手,不太懂,要画随着Q_N取值变化,er,ew,e的相应变化图像。以上程序调试出现:
Error using mupadmex
Error in MuPAD command: The argument is invalid. [Dom::Interval::new]
Error in sym/int (line 124)
rSym = mupadmex('symobj::intdef',f.s,x.s,a.s,b.s,options);
恳请大神指教。谢谢!!!
(打酱油的外行请绕道) 展开
东莞大凡
2024-08-07 广告
2024-08-07 广告
作为东莞市大凡光学科技有限公司的一员,我们深知Matlab圆点标定板在相机标定中的重要性。该标定板通过均匀分布的圆点,帮助精确计算相机参数,优化成像效果。Matlab强大的编程功能,使得我们能够灵活设计标定板,调整圆点大小、数量和分布,以满...
点击进入详情页
本回答由东莞大凡提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询