eqn solver could not solve my specific seqn
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi all,
Hope you are good.
I have a question about eqn solver. I have an array of constants for a variable and for this I created a for loop which works well but since my eqn is non-linear It does not solve it. Here is my code;
syms Vs Vg p k d Vfb
load b1mhz.txt
Vg = b1mhz(:,1);
prompt = 'k(dielectric constant) :';
k = input(prompt)
prompt = 'p(doping const.) :';
p = input(prompt)
prompt = 'd(thickness in cm) :';
d = input(prompt)
prompt = 'Vfb(V) :';
Vfb = input(prompt)
for i = 1:length(Vg)
Sol{i} = vpa(solve(Vg - Vfb - Vs - (11.7/k)*((2*0.026*p*1.6*10^-19)/(11.7*8.85*10^-14))^0.5*(d*11.7/k)*(exp(-Vs/0.026)+(Vs/0.026)-1+(1.5*10^10/p)^2*(exp(Vs/0.026)-(Vs/0.026)-1))^0.5 == 0,Vs));
end
Vg is my variable and I am stuck right now. I appreciate any help.
Best Regards,
Hasan
3 comentarios
Respuestas (4)
Walter Roberson
el 8 de Feb. de 2021
guess = 1;
for i = 1:length(Vg)
Sol{i} = vpasolve(Vg - Vfb - Vs - (11.7/k)*((2*0.026*p*1.6*10^-19)/(11.7*8.85*10^-14))^0.5*(d*11.7/k)*(exp(-Vs/0.026)+(Vs/0.026)-1+(1.5*10^10/p)^2*(exp(Vs/0.026)-(Vs/0.026)-1))^0.5 == 0,Vs, guess);
%make it easier for the next iteration by starting at the solution for this iteration
if ~isempty(Sol{i}); guess = Sol{i}; end
end
4 comentarios
Walter Roberson
el 10 de Feb. de 2021
syms Vs
guess = 1;
for i = 1:length(Vg)
thissol = vpasolve(Vg(i) - Vfb - Vs - (11.7/k)*((2*0.026*p*1.6*10^-19)/(11.7*8.85*10^-14))^0.5*(d*11.7/k)*(exp(-Vs/0.026)+(Vs/0.026)-1+(1.5*10^10/p)^2*(exp(Vs/0.026)-(Vs/0.026)-1))^0.5 == 0, Vs, guess);
%make it easier for the next iteration by starting at the solution for this iteration
if isempty(thissol)
Sol(i) = nan;
else
Sol(i) = thissol;
guess = thissol;
end
end
Hasan canar
el 9 de Feb. de 2021
3 comentarios
Walter Roberson
el 10 de Feb. de 2021
It is possible for vpasolve() to be unable to find a solution from a given starting point. However, in such cases, solve() usually cannot do any better. With the expression you are trying to work with, I can nearly guarantee that solve() cannot do any better than vpasolve(), and solve() is more likely to give up.
The general solution has at least two nested nonlinear roots -- that is, the solution requires finding the roots of one nonlinear equation, and the values found become part of the coefficients of another nonlinear equation that has to be solved. There is a third level too that is a quadratic equation that you have to find a specific root of, which you can do when you know specific numeric values for the input() prompts
Hasan canar
el 11 de Feb. de 2021
22 comentarios
Walter Roberson
el 21 de Feb. de 2021
Look at the output of eqn in https://www.mathworks.com/matlabcentral/answers/739187-eqn-solver-could-not-solve-my-specific-seqn#comment_1342594
Look inside the sqrt and observe that you have a constant times Vs, and then you have exp(-500/26*Vs) and those terms are added together. The result cannot be symmetric around 0 because the constant times Vs contributes negative for negative Vs and contributes positive for positive Vs.
As you have now triple checked the equations, we are left with the conclusion that the paper is incorrect and needs to be withdrawn. Would you prefer to write your refutation to the journal, or to the authors directly, or would you prefer to have me send a formal refutation to the authors of the paper, citing your important role in bringing the flaw to attention?
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





