Write a Matlab code to generate the following signal:
๐‘š (๐‘ก)=2๐‘ ๐‘–๐‘›๐‘ (2๐‘ก๐‘‡)+๐‘ ๐‘–๐‘›๐‘ (2๐‘ก๐‘‡+1)+ ๐‘ ๐‘–๐‘›๐‘ (2๐‘ก๐‘‡โˆ’1)

 ์ฑ„ํƒ๋œ ๋‹ต๋ณ€

Ameer Hamza
Ameer Hamza 2020๋…„ 6์›” 14์ผ
ํŽธ์ง‘: Ameer Hamza 2020๋…„ 6์›” 14์ผ

0 ๊ฐœ ์ถ”์ฒœ

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

Mahmoud Tahoun
Mahmoud Tahoun 2020๋…„ 6์›” 14์ผ
Thanks alot
Ameer Hamza
Ameer Hamza 2020๋…„ 6์›” 14์ผ
I am glad to be of help!

๋Œ“๊ธ€์„ ๋‹ฌ๋ ค๋ฉด ๋กœ๊ทธ์ธํ•˜์‹ญ์‹œ์˜ค.

์ถ”๊ฐ€ ๋‹ต๋ณ€ (0๊ฐœ)

์นดํ…Œ๊ณ ๋ฆฌ

๋„์›€๋ง ์„ผํ„ฐ ๋ฐ File Exchange์—์„œ Signal Processing Toolbox์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ

ํƒœ๊ทธ

์งˆ๋ฌธ:

2020๋…„ 6์›” 14์ผ

๋Œ“๊ธ€:

2020๋…„ 6์›” 14์ผ

Community Treasure Hunt

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

Start Hunting!

Translated by