matlab求最值P=60;A=300;a=20;w=20;c=2;h=0.05;m=0.01;k=2.4;B=1;alpha=0.3;C0=0.1;syms T;C=eval(sym('A+h*a*k/T*(1+T*log(1-m)-(1-m)^T)/(log(1-m))^3+h*k*P*((1-m)^T-1-T*log(1-m))/(log(1-m))^2+h*a*k*T/(2*log(1-m))+(w+c)*k*P*(1-(1-m)^T)/(1-m)^T/log(1-m)+(w
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 04:26:21
matlab求最值P=60;A=300;a=20;w=20;c=2;h=0.05;m=0.01;k=2.4;B=1;alpha=0.3;C0=0.1;syms T;C=eval(sym('A+h*a*k/T*(1+T*log(1-m)-(1-m)^T)/(log(1-m))^3+h*k*P*((1-m)^T-1-T*log(1-m))/(log(1-m))^2+h*a*k*T/(2*log(1-m))+(w+c)*k*P*(1-(1-m)^T)/(1-m)^T/log(1-m)+(w
matlab求最值
P=60;
A=300;
a=20;
w=20;
c=2;
h=0.05;
m=0.01;
k=2.4;
B=1;
alpha=0.3;
C0=0.1;
syms T;
C=eval(sym('A+h*a*k/T*(1+T*log(1-m)-(1-m)^T)/(log(1-m))^3+h*k*P*((1-m)^T-1-T*log(1-m))/(log(1-m))^2+h*a*k*T/(2*log(1-m))+(w+c)*k*P*(1-(1-m)^T)/(1-m)^T/log(1-m)+(w+c)*k*a/T*((1-m)^T-1-T*log(1-m))/(1-m)^T/(log(1-m))^2+C0/alpha*P*T+B*T-a*T/2'))
R=eval(sym('-k*P^2*T-k*a^2*T/3+P*k*a*T'))
Q=C-R
函数中T是变量,我想求函数Q中当T给定一范围比如说(0,10)时,Q的最大值,函数有点复杂啊,因为带有指数变量,就不知道怎么求了,求大神指导
matlab求最值P=60;A=300;a=20;w=20;c=2;h=0.05;m=0.01;k=2.4;B=1;alpha=0.3;C0=0.1;syms T;C=eval(sym('A+h*a*k/T*(1+T*log(1-m)-(1-m)^T)/(log(1-m))^3+h*k*P*((1-m)^T-1-T*log(1-m))/(log(1-m))^2+h*a*k*T/(2*log(1-m))+(w+c)*k*P*(1-(1-m)^T)/(1-m)^T/log(1-m)+(w
如果不是求解析解,就不需要用符号函数,直接计算就可以了,
T=0:0.01:10;
C=A+h*a*k./T.*(1+T*log(1-m)-(1-m).^T)/(log(1-m))^3+...
h*k*P*((1-m).^T-1-T*log(1-m))/(log(1-m))^2+...
h*a*k*T/(2*log(1-m))+(w+c)*k*P*(1-(1-m).^T)/(1-m).^T/log(1-m)+...
(w+c)*k*a./T.*((1-m).^T-1-T.*log(1-m))./(1-m).^T/(log(1-m))^2+...
C0/alpha*P*T+B*T-a*T/2;
R=-k*P^2*T-k*a^2*T/3+P*k*a*T;
Q1=C-R;
Q=max(Q1)