Plot an going down exponential curve by using values only

Why I can't plot a graph using the coding below. I wanna plot a Vout againt i, for getting the trendline.
clear
clc
Vin=10;
Vs=5;
Vd=0.7;
R1=2200;
R2=3300;
R3=linspace(0,1e5);
x=R2/R1;
for m=1:100
i=R3(1,m)/R1;
Vout=(x*Vin+x*i*Vs+i*(1+x)*Vd)/(x+i+x*i)
end
figure;
plot(i,Vout)

Réponses (1)

clear
clc
Vin=10;
Vs=5;
Vd=0.7;
R1=2200;
R2=3300;
R3=linspace(0,1e5);
x=R2/R1;
for m=1:100
I(m)=R3(1,m)/R1;
Vout(m)=(x*Vin+x*I(m)*Vs+I(m)*(1+x)*Vd)/(x+I(m)+x*I(m));
end
figure;
plot(I,Vout)

Catégories

En savoir plus sur Discrete Data Plots dans Centre d'aide et File Exchange

Produits

Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by