Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- #define is 1.0e-8
- #define q 1.6e-19
- #define n 2
- #define kb 1.38e-23
- #define T 350
- // com v variando entre -1.5V e 3.4V
- int main(void)
- {
- double i,v;
- i=1.0;
- for (v=-1.5;v<=3.4;v+=0.1)
- {
- i=is*exp(q*v/(n*kb*T));
- printf("%e\t %lf \n",i,v);
- }
- return 0;
- }
- // plot "q.dat" u 2:1 w lp t "T=272K","q2.dat" u 2:1 w lp t "T=300K","q3.dat" u 2:1 w lp t "T=350K"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement