How to write the equation in matlab I= A A* T² exp (qob/kT) exp (q(V - Rs I /kT)) (exp (-1/n) ? Why is the curve not shown in the drawing?

4 visualizzazioni (ultimi 30 giorni)
clear; close all; clc; n=5.2; %Ideality factor A =8.16; %Richardson constant q = 1.602e-19; % electron charge K = 1.380e-23; %Boltzmann constant T =140; % Absolute temperature phi_b = 0.43; %Barrier Height V =(0:0.1:2); Rs=7.74e9; %Resistance a=2.8e-5; %the effective area I1=1.5; I =A*a* (T.* T).* exp((-q.* phi_b)/(K* T).*exp((q.* V) ./ ( K* T))) .*exp((-q .*I1.*Rs) ./ (K* T).*(-1/n)); %corrected the paranthesis plot(V,I)
  5 Commenti
Dyuman Joshi
Dyuman Joshi il 20 Mar 2023
If the formula is correct, then so is the output and the plot from the code in my comment above.
The formula in above code is according to the formula in the title.

Accedi per commentare.

Risposte (2)

Torsten
Torsten il 19 Mar 2023
Maybe you mean
I = A*a*T^2*exp(q*phi_b/(K*T))*exp(q*(V-I1*Rs/(K*T)))*exp(-1/n)
?

John D'Errico
John D'Errico il 19 Mar 2023
n=5.2;
%Ideality factor
A =8.16;
%Richardson constant
q = 1.602e-19;
% electron charge
K = 1.380e-23;
%Boltzmann constant
T =140;
% Absolute temperature
phi_b = 0.43;
%Barrier Height
V =(0:0.1:2);
Rs=7.74e9;
%Resistance
a=2.8e-5;
%the effective area
I1=1.5;
I =A*a* (T.* T).* exp((-q.* phi_b)/(K* T).*exp((q.* V) ./ ( K* T))) .*exp((-q .*I1.*Rs) ./ (K* T).*(-1/n));
%corrected the paranthesis
I
I = 1×21
Inf NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
Before you plot it, why not look at the numbers you generated?
Remember that MATLAB uses DOUBLE PRECISION floating point arithmetic.
I would strongly suggest you compute the log of that expression. No, don't compute the variable I, then try to take the log. Take the log, by adding the logs of each individual term. Don''t even try to compute those exponentials. Remember that log(exp(x))=x.

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by