why is my code not working?

syms Tbrem(Tk)
n20av=1.1;
%time [s]
tauE=1.2;
%internal radius [m]
a=2.0;
% ellipticity
k=1.8;
%external radius [m]
R0=6.2;
%magnetic field [Tesla]
B0=5.3;
%inverse aspect rdius
epsy=a/R0;
% volume [m3]
Vp=2*pi*R0*pi*k*a^2;
sigmav =(10^(-6))*exp(-21.38/(Tk^(0.2935))-25.20-7.101*(10^(-2))*Tk+1.938*(10^(-4))*Tk^2+4.925*(10^(-6))*Tk^(3)-3.984*(10^(-8))*Tk^4);
sigmavn =sigmav/10^(-22);
Sa=(2.31*10^(5))*(n20av^(2))*sigmav;
Imax=7.5;
Sohm=(1/Vp)*(5.6*10^(-2)/(1-1.31*epsy^(1/2)+0.46*epsy))*(R0*Imax^(2))/(a^(2)*k*((Tk)^(3/2)));
Sb=6.14*(10^3)*(n20av^2)*Tk^(1/2);
%T bremsstrahlung
Tbrem(Tk) = Sa+Sohm-Sb==0;
sol = solve(Tbrem,Tk);

2 commentaires

Rik
Rik le 27 Nov 2018
Judging by the warning message your code is working fine, but your system of equations might not be solvable in their current form.
Franco Belletti
Franco Belletti le 28 Nov 2018
thanks!

Réponses (0)

Cette question est clôturée.

Produits

Version

R2018a

Clôturé :

le 20 Août 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by