How can i fine the convolution of a linear system with given input
1 次查看(过去 30 天)
显示 更早的评论
I have an adc with linear transfer function h(n)in time domain , and input to this is x(n), a sampled sine wave ,output of adc should be linear convolution of h(n) and x(n).when I convert output into frequency domain using fft, i am getting the amplitude 4 times higher then the input, whereas Gain of ADC is 1.Anyone can please help in this regard
2 个评论
回答(1 个)
Kamal Hussain
2018-4-7
编辑:Kamal Hussain
2018-4-7
here i have written a code for linear convolution using tabular method.
%linear convolution using tabular method
x=[1 2 3 4];
y=[1 2 3 4];
shift=0;
lin_conv=[zeros(1,length(x)+length(y)-1)];
for i=1:length(y)
shiftedd=shiftFTN(x,length(x),length(y),shift);
lin_conv=lin_conv + y(i).*shiftedd
shift=shift+1;
end
%i have used a self made function shiftFTN to shift the sequence to the right by 1.
function [Y]=shiftFTN(A,len_A,len_B,shift)
Y=zeros(1,len_A+len_B -1);
Y(shift+1:end)=[A(1:end),zeros(1,length(Y)-(shift+len_A))];
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Transforms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!