image
Physics Forums Logo
image
image
* Register * Upgrade Blogs Library Staff Rules Mark Forums Read
image
image   image
image

Go Back   Physics Forums > Engineering > Electrical Engineering


Reply

image Relative Power using Matlab Share It Thread Tools Search this Thread image
Old Nov4-09, 09:38 AM                  #1
Kipster1203

Kipster1203 is Offline:
Posts: 1
Relative Power using Matlab

I have the following code

dt = 0.01; % Set the time increment to 0.02 second.
t = (0:1:199)*dt; % Create a time array.
x1 = 0.5*square(pi*t); % Use MATLAB to create the signal
% amplitude +/- 0.5 and period 2.
subplot(2,1,1),plot(t,x1), axis([0,2.1,-0.6,0.6]);
x2 = zeros(1,length(x1)); % Define an empty column vector for the
% triangle function.
% Use a discrete approximation to the integral of the square
% wave to create the triangular signal.
x2(1) = -0.25;
for i = 2:200; x2(i) = x2(i-1) + x1(i)*dt; end
subplot(2,1,2),plot(t,x2), axis([0,2.1,-0.6,0.6]);

I need to calculate the sums of the power (by evaluating the fourier coefficients) in harmonics 1 - 3, 1 - 9, and 1 - 29 for signal x1 relative to the total power in the original signal x1.
Can anyone help me out??
  Reply With Quote
image image
Reply
Thread Tools


Similar Threads for: Relative Power using Matlab
Thread Thread Starter Forum Replies Last Post
Computing the power spectrum via matlab oscarmike Advanced Physics 0 Sep19-09 10:42 PM
SOlving power flow using gauss seidel and matlab, HELP O.J. Engineering, Comp Sci, & Technology 1 Dec17-08 01:06 PM
Matlab: How to apply filters to and ECG signal using matlab? g2g Math & Science Software 1 Mar29-07 06:21 PM
Waveguide modes relative power DaveCunnah Atomic, Solid State, Comp. Physics 0 Jan23-07 06:45 AM
Matlab and Power seang Math & Science Software 0 Feb14-06 05:04 PM

Powered by vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. © 2009 Physics Forums
Sciam | physorgPhysorg.com Science News Partner
image
image   image