How can i fine the convolution of a linear system with given input
2 views (last 30 days)
Show older comments
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 Comments
John D'Errico
on 15 Feb 2015
Show what you have done? How can anyone know what you did wrong otherwise?
Answers (1)
Kamal Hussain
on 7 Apr 2018
Edited: Kamal Hussain
on 7 Apr 2018
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))];
See Also
Categories
Find more on Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!