find the mean, energy and power of cosine function
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Passband Modulation
il 21 Set 2012
Commentato: Abdullah Zubair
il 21 Feb 2020
i am just a matlab beginner.
x[n]=2cos(0.2*pi*n) with a length of N =100 , that is, ,0<N<99 plotted
clear all
n=[0:99];
x=2*cos(0.2*pi*n);
stem(n,x);
legend('x[n]');
title('Sequence of 2*cos(0.2*pi*n)');
xlabel('n');
ylabel('x[n]');
axis([0 99 -2 2]);
how to use MATLAB to compute the mean, and energy and power of x[n]given mean=x, energy=Ex and power=Px.
0 Commenti
Risposta accettata
Wayne King
il 21 Set 2012
Modificato: Wayne King
il 21 Set 2012
You can just do:
mean(x)
Ex = norm(x,2)^2 % the energy
Px = 1/numel(x)*norm(x,2)^2 % power
If you don't want to use norm(), you just use sum()
Ex = sum(abs(x).^2)
Px = 1/numel(x)*sum(abs(x).^2)
Note that the RMS of the signal is
sqrt(Px)
The Signal Processing Toolbox implements this as rms()
3 Commenti
Walter Roberson
il 18 Dic 2013
pinak parida commented,
power ,energy of a signal how norm works to be check?
Abdullah Zubair
il 21 Feb 2020
mean(x)
Ex = norm(x,2)^2 % the energy
Px = 1/numel(x)*norm(x,2)^2 % power
what is this 2 in norm function is for?
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Fourier Analysis and Filtering in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!