Continue to Site

# Need help with plotting V and I in Matlab code

Status
Not open for further replies.

#### rajabi_u

##### Newbie level 5
matlab help

hello all;
iwant to plot" i " versus "v" ;that i is current abnd v is voltage;
then formla is bellow:
V=[0:.01:600];
(.317V)^2=[((1.5/I)+(1.5*I)-(.27*V*I))^2]+[((1.5*I)+(.27*V*I))^2];
ok thanks

Re: matlab help

I think you should first solve for I as a function of V. Then you can use that to write an expression in Matlab. Once you get that expression and write I=f(V) then you are basically done. The following code (with an appropriate expression on the right hand side of I= ) should do it.

Code:
V=[0:.01:600];
I=
plot(V,I),grid

Re: matlab help

hi
everey body knows that .
but i want to know :can write a progrom for same this problem ,that
its progrom solve the that formola;
ok thanks
regards

Re: matlab help

OK ... now I understand. You never said that you wanted to "solve" the system.
I don't think Matlab is the right tool to solve this unless you have the Symbolic Math Toolbox http://www.mathworks.com/products/symbolic/

If not, you probably need a symbolic algebra tool like Mathematica or Maple. These tools can be used to solve these problems. If you don't have access to these either I would try the open-source package called Maxima. You can download it for free here http://maxima.sourceforge.net/

Of course, you can do it the old-fashioned way and actually do the algebra -- that is up to you to decide.

Hope that this helps you out.

Best regards,
v_c

Status
Not open for further replies.