Write a Matlab code to generate the following signal:
𝑚 (𝑡)=2𝑠𝑖𝑛𝑐 (2𝑡𝑇)+𝑠𝑖𝑛𝑐 (2𝑡𝑇+1)+ 𝑠𝑖𝑛𝑐 (2𝑡𝑇−1)

 Réponse acceptée

Ameer Hamza
Ameer Hamza le 14 Juin 2020
Modifié(e) : Ameer Hamza le 14 Juin 2020

0 votes

easy peasy:
t = -2:0.01:2;
T = 2;
y = 2*sinc(2*T*t) + sinc(2*T*t+1) + sinc(2*T*t-1);
plot(t, y)
sinc() function is defined in Signal Processing toolbox.
If you don't have the toolbox, then you can define it like this
function y = sinc(x)
y = sin(pi*x)./(pi*x);
y(x==0) = 1;
end

2 commentaires

Mahmoud Tahoun
Mahmoud Tahoun le 14 Juin 2020
Thanks alot
Ameer Hamza
Ameer Hamza le 14 Juin 2020
I am glad to be of help!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Signal Processing Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by