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!