Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top