フィルターのクリア

Difficulty in plotting equation in matlab

36 ビュー (過去 30 日間)
mitsuo
mitsuo 2024 年 7 月 9 日 4:23
I need the MATLAB code to plot the equation
V = ((N.*k.*T_ambient./q).*(log(I./Iso)-(q.*Vgo/(N.*k.*T_ambient))) + Vgo+Rso.*I)./(1-(N.*k.*Rth.*I./q).*(log(I./Iso)-(q.*Vgo./(N.*k.*T_ambient))) - alphao.*Rso.*(I.^2).*Rth)
V should be on x axis and I on y axis. I is to be obtained using V. The values of ther variables are :
N = 1.15;
k = 1.38e-23;
q = 1.6e-19;
Vgo = 1.174;
Rso = 0.085;
Iso = 21.6e-15;
alphao = 0.0165;
Rth = 1;
T_ambient = 298;

回答 (2 件)

Francisco J. Triveno Vargas
Francisco J. Triveno Vargas 2024 年 7 月 9 日 4:52
Hello,
You need to create a vector or current like I = 0.01:0.1:20 Ampers,
Calculate the equation for V after plot the vector V related I
figure(10)
plot(V,I)
grid on
xlabel('Current')
ylabel(''Voltage')
  3 件のコメント
Sam Chak
Sam Chak 2024 年 7 月 9 日 5:35
The vector V is automatically created when the vector I is used in the equation. Of course, if it also possible to define the equation for V first, and then creates vector I, but this 2nd method requires you to create a function handle. To avoid confusion, learn basic of plotting as shown by @Francisco J. Triveno Vargas.
I = linspace(0, 25, 2501);
V = ((N.*k.*T_ambient./q).*(log(I./Iso)-(q.*Vgo/(N.*k.*T_ambient))) + Vgo+Rso.*I)./(1-(N.*k.*Rth.*I./q).*(log(I./Iso)-(q.*Vgo./(N.*k.*T_ambient))) - alphao.*Rso.*(I.^2).*Rth);
plot(V, I), grid on, xlabel I, ylabel V
Francisco J. Triveno Vargas
Francisco J. Triveno Vargas 2024 年 7 月 10 日 6:17
Nice

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


Walter Roberson
Walter Roberson 2024 年 7 月 9 日 5:38
N = 1.15;
k = 1.38e-23;
q = 1.6e-19;
Vgo = 1.174;
Rso = 0.085;
Iso = 21.6e-15;
alphao = 0.0165;
Rth = 1;
T_ambient=298;
eqn = @(V,I) V - ( ((N.*k.*T_ambient./q).*(log(I./Iso)-(q.*Vgo/(N.*k.*T_ambient))) + Vgo+Rso.*I)./(1-(N.*k.*Rth.*I./q).*(log(I./Iso)-(q.*Vgo./(N.*k.*T_ambient))) - alphao.*Rso.*(I.^2).*Rth) )
eqn = function_handle with value:
@(V,I)V-(((N.*k.*T_ambient./q).*(log(I./Iso)-(q.*Vgo/(N.*k.*T_ambient)))+Vgo+Rso.*I)./(1-(N.*k.*Rth.*I./q).*(log(I./Iso)-(q.*Vgo./(N.*k.*T_ambient)))-alphao.*Rso.*(I.^2).*Rth))
fimplicit(eqn, [0 200 0 30])
xlabel('V'); ylabel('I')

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by