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)

Respuestas (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)

Categorías

Más información sobre Mathematics en Centro de ayuda y File Exchange.

Productos

Versión

R2022b

Preguntada:

el 9 de Dic. de 2022

Respondida:

el 9 de Dic. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by