amplitude spectrum of signal
1 回表示 (過去 30 日間)
古いコメントを表示
1)Determine and plot the amplitude spectrum of the even signal x(t) analytically and numerically, then compare the results.

2)If signal x(t) passes through an LTI system with impulse response h(t); Determine and plot the amplitude and phase spectrum of the output signal.

0 件のコメント
回答 (1 件)
Anudeep Kumar
2025 年 7 月 30 日
You can define 'x(t)' and 'h(t)' using basic MATLAB arrays as below and plot using the 'plot()' function.
% Define t
t = -5:0.01:5; % Adjust the range and step as needed
% x(t)
x = zeros(size(t));
x(abs(t) >= 0 & abs(t) <= 1) = t(abs(t) >= 0 & abs(t) <= 1) + 1;
x(abs(t) > 1 & abs(t) <= 2) = 2;
x(abs(t) > 2 & abs(t) <= 4) = -t(abs(t) > 2 & abs(t) <= 4) + 4;
% h(t)
h = zeros(size(t));
h(t >= 0 & t <= 2) = 1;
h(t > 2 & t <= 3) = -1;
% Plot x(t)
figure;
subplot(2,1,1);
plot(t, x, 'LineWidth', 2);
xlabel('t'); ylabel('x(t)');
title('x(t)');
grid on;
% Plot h(t)
subplot(2,1,2);
plot(t, h, 'LineWidth', 2);
xlabel('t'); ylabel('h(t)');
title('h(t)');
grid on;
As for the second part please look into the 'conv' function from MATLAB and apply it as per your use case. Below are the links to all the documentation you may want to refer to:
I hope this helps!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Audio Processing Algorithm Design についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!