I am not getting the solution for my coding.
2 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Star Strider
on 26 Mar 2020
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 Comments
Star Strider
on 26 Mar 2020
@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!
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!