Please anyone can help to plot a graph, i didnt get a graph for the below program, it didnt showing any error, the output coming like a blank graph.

4 views (last 30 days)
% depletion capacitance
%
cj1 = 4.5e-12; vs1 = -10;
cj2 = 6.5e-12; vs2 = -2;
vc = 0.65;
num = cj1/cj2;
den = (vc-vs2)/(vc-vs1);
m = 0.02644;
cj0 = 9.4246e-012;
vs = -30:0.2:0.4;
k = length(vs);
for i = 1:k
cj(i) = cj0/(1-(vs(i)/vc))^m;
end
plot(vs,cj,'w')
xlabel('Voltage,V')
ylabel('Capacitance,F')
title('Depletion Capacitance vs. Voltage')
axis([-30,2,1e-12,14e-12])

Answers (1)

Arif Hoq
Arif Hoq on 15 Mar 2022
try this:
cj1 = 4.5e-12; vs1 = -10;
cj2 = 6.5e-12; vs2 = -2;
vc = 0.65;
num = cj1/cj2;
den = (vc-vs2)/(vc-vs1);
m = 0.02644;
cj0 = 9.4246e-012;
vs = -30:0.2:0.4;
k = length(vs);
for i = 1:k
cj(i) = cj0/(1-(vs(i)/vc))^m;
end
plot(vs,cj,'--')
xlabel('Voltage,V')
ylabel('Capacitance,F')
title('Depletion Capacitance vs. Voltage')
axis([-30,2,1e-12,14e-12])

Communities

More Answers in the  Power Electronics Control

Community Treasure Hunt

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

Start Hunting!