Solving equation returns a 0x1 sym
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have two equations which I am trying to set equal to each other and solve, but it keeps returning "empty sym 0X1", and I'm not sure why. Any help? Intent to set S1=S2 and solve for T2. It works to give me a numeric value for S1, but can't get a solution for S2. Code below:
N=1000;
T1=300;
V1=.002;
V2=1*10^-5;
h=6.626*10^-34;
kb=1.38*10^-23;
g=3;
Sigma=2;
Thetav=2256;
m=3*10^-26;
r=(1.21*10^-10)/2;
I=m*r^2;
S1=N*kb*(log(((4*pi*m*kb*T1)/(h^2))*((V1*exp(5/2))/N)) + log((8*pi^2*I*kb*T1)/(Sigma*h^2)) + (Thetav*T1)/(exp(Thetav/T1)-1) - log(1-exp(-Thetav/T1)) + log(g))
S2=S1;
syms T2;
S2==N*kb*(log(((4*pi*m*kb*T2)/(h^2))*((V2*exp(5/2))/N)) + log((8*pi^2*I*kb*T2)/(Sigma*h^2)) + (Thetav*T2)/(exp(Thetav/T2)-1) - log(1-exp(-Thetav/T2)) + log(g));
solve(S2,T2)
0 commentaires
Réponses (1)
Walter Roberson
le 26 Avr 2019
N=1000;
T1=300;
V1=.002;
V2=1*10^-5;
h=6.626*10^-34;
kb=1.38*10^-23;
g=3;
Sigma=2;
Thetav=2256;
m=3*10^-26;
r=(1.21*10^-10)/2;
I=m*r^2;
S1=N*kb*(log(((4*pi*m*kb*T1)/(h^2))*((V1*exp(5/2))/N)) + log((8*pi^2*I*kb*T1)/(Sigma*h^2)) + (Thetav*T1)/(exp(Thetav/T1)-1) - log(1-exp(-Thetav/T1)) + log(g))
syms T2;
S2=N*kb*(log(((4*pi*m*kb*T2)/(h^2))*((V2*exp(5/2))/N)) + log((8*pi^2*I*kb*T2)/(Sigma*h^2)) + (Thetav*T2)/(exp(Thetav/T2)-1) - log(1-exp(-Thetav/T2)) + log(g));
solve(S1==S2,T2)
4 commentaires
Walter Roberson
le 27 Avr 2019
Modifié(e) : Walter Roberson
le 27 Avr 2019
T2 of 300.5 is accurate to within the precision expressed by 300.5 .
fplot(S1-S2,[300 305])
You can fplot S2 to see that it is a strictly increasing function over the positives. It starts lower than S1 and increases, so there is a single point of interception.
Voir également
Catégories
En savoir plus sur Calculus dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!