Created
February 7, 2020 17:14
-
-
Save HectorTorres/5d67fc3607517c4571f4dab38e151338 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I0=(50*^-9); (* Corriente de saturación en inversa *) | |
Vt=0.026; (* Voltaje termico *) | |
Ef=5; (* Fuente de DC *) | |
R=1000; (* Resistencia *) | |
i1[v_]:=I0*(Exp[v/Vt]-1) (* Ecuación del diodo, en formato de función *) | |
i2[v_]:=(Ef-v)/R (* Ecuación del circuito, en formato de función *) | |
Plot[{i1[v],i2[v]},{v,0,1},PlotRange->{0,Ef/R}] (* Graficando dos funciones *) | |
vd=FindRoot[{I0*(Exp[v/Vt]-1)==(Ef-v)/R},{v,1}] (*Haciendo uso de un metodo iterativo para encontrar una solución *) | |
i1[vd[[1,2]]] (*Evaluando la función del diodo con el voltaje obtenido *) | |
i2[vd[[1,2]]] (*Evaluando la función del circuito con el voltaje obtenido *) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment