Plot I-V Curve by Using Matlab

Status
Not open for further replies.

qiushidaren

Full Member level 2
Joined
Mar 21, 2006
Messages
149
Helped
4
Reputation
8
Reaction score
3
Trophy points
1,298
Location
BME??BFE
Activity points
2,426
how to plot iv curve

Hi all, I want to plot an i-v curve of this equation i=100*[1.3-v+500*(5-i)]^2 by using Matlab, but unfortunately it looks that the plot I get isn’t the one that I want, so I think there must be something wrong but I don’t know it. Your suggestions and comments will be highly appreciated!
Here is my code:
%current versus voltage curve
v=0:0.1:3;
i=100*[1.3-v+500*(5-i)].^2;
plot(v,i)
title('current versus voltage of 2.6(c)')
xlabel('Voltage(V)')
ylabel('Current(uA)')
grid
 

how to plot i-v curve

The problem here is from the fact that you have i in the right and left side of the equation, so you cant use the expressions in the way you did, what is the first value of i here? Haow can matlab guess the i in the right side? you just dont have it ! so the graphic is not what you expected.

You must do a for loop giving i a initial value calculate i recursevily then buid the two vectors i and v afterwards you can plot v x i graphic
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…