Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Convolution Capabilities in MATLAB
1 回表示 (過去 30 日間)
古いコメントを表示
Hello!
I have 2 discrete signals that I have entered into MATLAB and successfully gotten a graph of the convolution of the two. I’m wondering if MATLAB is capable of turning this into an output function. Currently I have h(n)=1 for n=0:9 and x(n)=3.*n.*heaviside(-n) both plotted on a stem graph. I also have the convolution as a stem graph, however, I tried getting an equation output from this and have not had any luck.
Below is my code that works as I want minus turning w into a function.
clear all;
close all;
subplot(2,2,1);
n = -9:9;
A = 3.*n.*heaviside(-n);
stem(n,A)
title('Graph of x(n)')
xlabel('n')
ylabel('x(n)')
subplot(2,2,2);
k = 0:9;
for m = 1:numel(k);
H(m) = 1;
end
stem(k,H);
title('Graph of h(n)')
xlabel('n')
ylabel('h(n)')
subplot(2,2,3);
p = 1:28;
w = conv(A,H);
stem(p,w)
title('Graph of y(n): Convolution of h(n) and x(n)')
xlabel('n')
ylabel('y(n)') % code
0 件のコメント
回答 (0 件)
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!