Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

how resolve non linear equation by mathlab

1 visualización (últimos 30 días)
khouloud abiedh
khouloud abiedh el 7 de Jul. de 2018
Cerrada: Walter Roberson el 7 de Jul. de 2018
hello ,i m debutant in matlab and i need to do a fit of my experimental data by LSE model in matlab iwrite the last comment i find who ask for this model but just for energetic positon i write the same code of the energetic position of a gaussian but i find a problem to do an exact fit of the data by matlab ,also i need to do a fit of the LMH of the gaussian by this model in matlab .when i read the article i understand that it must resolve another equation numerically to find the LMH described in the LSE model.i use the same code but i change the equation but it display an error.i need our help please help me and thank you in advance.
%% trouver x et tracer la position energetique sigma = 13*10^-3;%eV deltaE = -73e-3;%eV E0 = 1.185;%eV Ea = E0+75e-3; tautr=0.027 ; taur=250; Kb = 8.617*10^-5;%eV/K theta = 270; %K alfa = 0.48e-3;%eV/K T= 0:10:300; X = zeros(size(T)); E2 = zeros(size(T)); E1= zeros(size(T)); a = zeros(size(T)); syms x
for i=1:numel(T)
E1(i) = E0 -( alfa*T(i)^2)/(theta+T(i));
X(i) = vpasolve(((sigma/(Kb*T(i)))^2 - x)*(taur/tautr)*exp(deltaE/(Kb*T(i)))-x*exp(x)==0,x);
E2(i) = E0 -(alfa*T(i)^2)/(theta + T(i))-X(i)*Kb*T(i);
a(i) = X(i)*Kb*T(i);
end
figure(1);plot(T,E1,'r.'); figure(2);plot(T,E2,'g') hold on ;plot(T,E1,'r') figure(3);plot(T,X,'k.','Markersize',5) figure(4);plot(T,a,'k'); %%to find LMH i must resolve n(E0-X(T)*Kb*T,T)/2=n(E,T)
%%trouver n(E0-X(T)*Kb*T,T)/2 % n(E,T)= exp(-(E(i)-E0)^2/(2*sigma^2)/(exp((E(i)-Ea)/(Kb*T(i)))+(tautr/taur)))
E = zeros(size(T));
n = zeros(size(T)); n1=zeros(size(T));
for i=1:numel(T)
E(i)= E0-a(i);
n(i)=exp(-(E(i)-E0).^2/(2*sigma^2))/(exp((E(i)-Ea)/(Kb*T(i)))+(tautr/taur));
n1(i)=n(i)/2;
end
figure (5) plot(E1,n1) %%X1=zeros(size(T));
syms x1
for i=1:numel(T)
X1(i) = vpasolve(exp(-(E(i)-E0)^2/(2*sigma^2))/(exp((E(i)-Ea)/(Kb*T(i)))+(tautr/taur))-n1(i)==0,x1);
end
  1 comentario
Walter Roberson
Walter Roberson el 7 de Jul. de 2018
Duplicates https://www.mathworks.com/matlabcentral/answers/408774-how-modelise-write-a-code-of-lse-model-by-matlab-and-how-to-do-a-fit-of-a-experimental-data-with

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by