I am not getting the solution for my coding.
1 次查看(过去 30 天)
显示 更早的评论
syms q
S=6;
D=4800;
A=25;
Delta=0.2;
F=50;
V=1;
d=50;
tow=0.1;
M=7250;
n=2;
G1=0.2075;
c0=800;
C=((2*n*q)/((2*D)+(q*G1)))*(tow*M);
q=Sqrt(((2*D)*(A+C+(n*F)))/(n*((B+(d*G1))+(S+(d*G1))*((((2-n)*D)/P)+n-1)+(V*G1))))
TOT=(tow*M*(ln(c0/C)))+((D/(n*q))+(G1/(2*n)))*(A+C+(n*F)+(V*n*q))+[(q/2)*((B+(d*G1))+(S+(d*G1))*((((2-n)*D)/P)+n-1))];
Soln=Solve(q, C, TOT)
0 个评论
回答(1 个)
Star Strider
2020-3-26
Try this corrected version of your code:
syms q B P
S=6;
D=4800;
A=25;
Delta=0.2;
F=50;
V=1;
d=50;
tow=0.1;
M=7250;
n=2;
G1=0.2075;
c0=800;
C=((2*n*q)/((2*D)+(q*G1)))*(tow*M);
q=sqrt(((2*D)*(A+C+(n*F)))/(n*((B+(d*G1))+(S+(d*G1))*((((2-n)*D)/P)+n-1)+(V*G1))))
TOT=(tow*M*(log(c0/C)))+((D/(n*q))+(G1/(2*n)))*(A+C+(n*F)+(V*n*q))+[(q/2)*((B+(d*G1))+(S+(d*G1))*((((2-n)*D)/P)+n-1))];
[Soln,Parms,Conds]=solve(q, 'ReturnConditions',1)
3 个评论
Star Strider
2020-3-26
@shunmugam hemalatha — The solution is:
Soln =
-1280000/3121
Parms =
Empty sym: 1-by-0
Conds =
B ~= -10783/400
Use the vpa function to return a decimal fraction.
@Guillaume — Thank you!
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Numbers and Precision 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!