Académique Documents
Professionnel Documents
Culture Documents
t=-1:.01:1;
x=t; % Ramp Signal...
figure(1);
plot(t,x);
grid;
xlabel('t');
ylabel('x(t)');
figure(2);
plot(t,x.^2);
xlabel('t');
ylabel('x^2(t)');
title('Energy of Ramp signal')
axis([-1 1 -.2 2]);
grid;
figure(3);
area(t,x.^2); % Energy is nothing but Area calculation...
xlabel('t');
ylabel('x^2(t)');
title('The colored area gives the energy')
axis([-1 1 -.2 1.1]);
grid;
Make a program free:
Make an Electronics Project than Contact:
hardikbrainmaster@yahoo.com
hardiksimpleec@gmail.com
subplot(2,1,2);
stem(n,x2); % Signal X2
grid on;
xlabel('n');
ylabel('x_2(n)');
%----------------------------------
figure(2);
subplot(2,1,1);
plot(t,x1.^2); % Energy of X1
grid on;
hold on
% red lines marking 0 & 1
plot([0 0], [-.2 1.2],'r', [1 1], [-.2 1.2],'g');
%hold off
axis([-2 2 -.2 1.2]);
title('Squared sines');
xlabel('t');
ylabel('x_1^2(t)');
subplot(2,1,2);
stem(n,x2.^2); % Energy of X2
grid on;
hold on;
% red lines marking 1 & 20
plot([1 1], [-.2 1.2],'r', [20 20], [-.2 1.2],'g');
hold off;
axis([-40 40 -.2 1.2]);
xlabel('n');
ylabel('x_2^2(n)');