I want to plot an implicit equation

1 回表示 (過去 30 日間)
mohd ayaz
mohd ayaz 2022 年 4 月 21 日
回答済み: Sam Chak 2022 年 4 月 21 日
I have attached the equations and its all variable I don't know how to plot.
  4 件のコメント
mohd ayaz
mohd ayaz 2022 年 4 月 21 日
phit1=0.026;
Nd1=1e19;
phim1=5.2
ni=1.5e10;
chi=4.1;
Eg=1.1
Vfb1=phim1-(chi+(Eg/2)-phit1*(log(Nd1/ni)))
ni=1.5e10;
q=1.6e-19;
eox=3.9*8.8*1e-14
tf1=6*10^-7
tox=0.7*10^-7
Cox=eox/tox
esi=8.8*11.7*1e-14
Qss1=3*10^-6
Qc1=2*10^-5
Ec1=1.4*10^6;
Tsc1=1*10^-6;
p1=q*Nd1*Tsc1
alpha_1=-((3*sqrt(3))/4)*(Ec1/Qss1)
beeta_1=((3*sqrt(3))/8)*(Ec1/(Qss1^3))
damma_1=0
alpha1=2*tf1*alpha_1
beeta1=4*tf1*beeta_1
damma1=6*tf1*damma_1
Vgd1=1;
N=30;
Vds=linspace(0,1,N);
Qd1=zeros(1,N);
for i=1:N
syms x
assume(x,'real')
eqnLeft = (Vgd1-Vfb1-Vds(i)+((Tsc1/(8*esi))*(x+p1)))-0.026*(log(2*sqrt(((x+p1)*Tsc1)/(8*3.14*0.026*esi))*(1-((x+p1)/(p1)))));
eqnRight =((alpha1+(1/Cox))*((x+p1)/2))+(beeta1*(((x+p1)/2).^3))+(damma1*(((x+p1)/2).^5));
Qd1(1,i)=vpasolve(eqnLeft == eqnRight,x);
end
%Qd1(1,i)=vpasolve(eqnLeft == eqnRight,x,"What should be here?");
mohd ayaz
mohd ayaz 2022 年 4 月 21 日
@David Goodmanson yes Qm is negative

サインインしてコメントする。

回答 (2 件)

David Goodmanson
David Goodmanson 2022 年 4 月 21 日
編集済み: David Goodmanson 2022 年 4 月 21 日
Hi mohd,
This is not really an implicit equation since Vgs appears only once, by itself, on the lhs. So you can take all the other stuff to the rhs and use Qm as the independent variable and Vgs as the dependent variable. You can experiment around for the range of Qm that gives the correct range for Vgs, assuming there is one. When you fine the right range, don't be reluctant to use lots of points in the Qm array. Ater you find the corresponding Vgs array you can plot(Vgs,Qm). One catch is if Qm+qNdtsi goes negative, in which case you will run into problems with the log term.

Sam Chak
Sam Chak 2022 年 4 月 21 日
I tried to plot this way to first visualize how the curve looks like for the positive part of .
Qm = linspace(-1, 0, 1001);
Vgs = (1 + 1)*(Qm + 1)/2 + 1*((Qm + 1)/2).^3 + 1*((Qm + 1)/2).^5 + 1 + 1 - 1*(Qm + 1) + 1*log(- Qm.*sqrt((Qm + 1)/(1)));
plot(Qm, Vgs, 'linewidth', 1.5)
grid on
xlabel('Q_{m}')
ylabel('V_{gs}')
So, you want to invert the axes to plot(Vgs, Qm). You can check this documentation:
f = @(Vgs, Qm) Vgs - ((1 + 1)*(Qm + 1)/2 + 1*((Qm + 1)/2).^3 + 1*((Qm + 1)/2).^5 + 1 + 1 - 1*(Qm + 1) + 1*log(- Qm.*sqrt((Qm + 1)/(1))));
fimplicit(f, [-5 2 -1 0])
grid on
xlabel('V_{gs}')
ylabel('Q_{m}')
Now, make the substitution of the original constants.

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by