how to solve the nonlinear equatios?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
KSSV
am 2 Jan. 2020
YOu cannot use solve at the step eqns = . What are the equations exactly? Can you explain the problem.
Antworten (1)
KSSV
am 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 Kommentare
VBBV
am 7 Mär. 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])
Siehe auch
Kategorien
Mehr zu Number Theory finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!