how to solve the nonlinear equatios?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
syms T v
p=30;a=7;d=1;lamda=0.8;c=10;r=35;h=0.05;w=200;k=0.02;b=7;
M=k*a;
%eqn1=(1/T)*(p*d-((lamda*p*d*v)/T)-(d*exp(-(w-k)*v)-(d*v/T))*c-d*((v/T)-1)*r-(d/(w-k))*(1-exp(-(w-k)*v)*h)))==0'
%eqn2=((1/T)*(-(d*c*v*exp(-(w-k)*v)*M/(w-k))+(((d*c*(1-exp(-(w-k)*v))+h*d*v*(1+exp(-(w-k)*v)))*M)/(w-k)^2)+((2*h*d*(exp(-(w-k)*v)-1)*M)/(w-k)^3)-1))== 0
eqns = solve('((1/T)*(p*d-((lamda*p*d*v)/T)-(d*exp(-(w-k)*v)-(d*v/T))*c-d*((v/T)-1)*r-(d/(w-k))*(1-exp(-(w-k)*v)*h)))==0','((1/T)*(-(d*c*v*exp(-(w-k)*v)*M/(w-k))+(((d*c*(1-exp(-(w-k)*v))+h*d*v*(1+exp(-(w-k)*v)))*M)/(w-k)^2)+((2*h*d*(exp(-(w-k)*v)-1)*M)/(w-k)^3)-1))== 0');
solve(eqns,T,v)
4 commentaires
KSSV
le 2 Jan 2020
YOu cannot use solve at the step eqns = . What are the equations exactly? Can you explain the problem.
Réponses (1)
KSSV
le 2 Jan 2020
Try this.
syms v T
p=30;d=1;lamda=0.8;c=10;r=35;h=0.05;chi=200;k=0.02;b=7;a =0.01;
w = k*(1-exp(-a*chi));
M=k*a;
equation1=(1/T)*[(p*d-((lamda*p*d*v)/T)-(d*exp(-(w-k)*v)-(d*v/T))*c-d*((v/T)-1)*r-(d/(w-k))*(1-exp(-(w-k)*v)*h))]==0 ;
equation2=(1/T)*[-(d*c*v*exp(-(w-k)*v)*M/(w-k))+(((d*c*(1-exp(-(w-k)*v))+h*d*v*(1+exp(-(w-k)*v)))*M)/(w-k)^2)+((2*h*d*(exp(-(w-k)*v)-1)*M)/(w-k)^3)-1]== 0 ;
eqns = [equation1, equation2] ;
S = solve(eqns,[ T v]) ;
2 commentaires
VBBV
le 7 Mar 2024
syms v T
p=30;d=1;lamda=0.8;c=10;r=35;h=0.05;chi=200;k=0.02;b=7;a =0.01;
w = k*(1-exp(-a*chi));
M=k*a;
equation1=(1/T)*[(p*d-((lamda*p*d*v)/T)-(d*exp(-(w-k)*v)-(d*v/T))*c-d*((v/T)-1)*r-(d/(w-k))*(1-exp(-(w-k)*v)*h))]==0 ;
equation2=(1/T)*[-(d*c*v*exp(-(w-k)*v)*M/(w-k))+(((d*c*(1-exp(-(w-k)*v))+h*d*v*(1+exp(-(w-k)*v)))*M)/(w-k)^2)+((2*h*d*(exp(-(w-k)*v)-1)*M)/(w-k)^3)-1]== 0 ;
eqns = [equation1, equation2] ;
S = vpasolve(eqns,[ T v])
Voir également
Catégories
En savoir plus sur Number Theory dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!