inductor instantaneous power in Matlab

Status
Not open for further replies.

madeza

Member level 4
Joined
Mar 10, 2006
Messages
74
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,288
Location
Arequipa / PERU
Activity points
1,759
hi everybody

I'm trying to plot or show the instantaneous power on inductance...
I use a sine voltage v=100cos(wt) and L=50mH
this is the code I've entered in Matlab

t=0:0.00001:0.1;
v=100*cos(377*t);
x=2*pi*60*50E-3;

since PL=VmIm(sin2wt) and Vm=wLIm w=2Πf
I'll try to use the following eq. PL=((V^2)/wL)sin(2wt) to plot but no results...

I mean I want to plot the instantaneous power, the voltage and the current...

Do you have any idea...
thank's in avanced...
 

your code apears below. you should use .* not *.

*, /, ^ =====> use for matrix multiply
.*, ./,.^ =====> use for number multiply

[1 2;3 4].*[1 2;3 4] = [1 2;3 4].^2 = [1 4;9 16]
[1 2;3 4]*[1 2;3 4] = [1 2;3 4] ^2 = [7 10;15 22]


t=0:0.0001:0.1;
v=100*cos(377*t);
x=2*pi*60*50E-3;
L=50e-3;
f=60; w=2*pi*f;
PL=((v.^2)/w/L).*sin(2*w*t);


 

madeza said:
PL=VmIm(sin2wt) and Vm=wLIm w=2Πf
. PL=((V^2)/wL)sin(2wt) to plot but no results...

...

In matlab we should put the operator, i.e. when we wanna to maltiply 2&f, we can writ it by hand as:2f or 2(f), but in matlab we should use the operato * in multilication, so that 2f in matlab is :2*f
i see that the code whom given to u after a while may end ur problem
 

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