discrete.m

来自「matlab实现卷积运算。非常高兴业大家分享此代码。」· M 代码 · 共 9 行

M
9
字号
x=input('please input the signal function and it is a array with format[x1..xn]');
xn=input('please input the signals period and it is a array with format[a:b]');
h=input('please input the system function and it is a array with format[h1..hn]');
hn=input('please input the system period  and it is a array with format[c:d]');
y1=xn(1)+hn(1);
y2=xn(length(x))+hn(length(h));
y3=[y1:y2];
fprintf('please input y=conv(x,h) and stem(y,y3).after that you will get the answer of the convolution and see the picture of output signal')
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?