convolution of two signals
Afficher commentaires plus anciens
I have two signals represented by x and y values respectively. I have to find the convolution between the two signals. I am attaching the graph plotted from the two signals. can someone help. Thanks.
Réponses (4)
José-Luis
le 12 Juin 2014
You could use the conv() function. It seems to do exactly what you want.
conv(x,y)
Please read the documentation.
doc conv
4 commentaires
Yuvashree Mani Urmila
le 12 Juin 2014
José-Luis
le 12 Juin 2014
That is a totally different question.
doc xlsread
The documentation explains quite well how to import data from excel.
Please accept an answer once your problem has been solved.
Yuvashree Mani Urmila
le 13 Juin 2014
José-Luis
le 13 Juin 2014
Use conv() two times? I am sorry but I don't understand.
Image Analyst
le 13 Juin 2014
numbers = xlsread(excelFullFileName);
x1 = numbers(:, 1); % x1 assumed to be in column 1.
y1 = numbers(:, 2); % y1 assumed to be in column 2.
x2 = numbers(:, 3); % x2 assumed to be in column 3.
y2 = numbers(:, 4); % y2 assumed to be in column 4.
out1 = conv(x1,y1);
out2 = conv(x2,y2);
Shahin Alam
le 4 Jan 2017
Modifié(e) : Image Analyst
le 4 Jan 2017
x=[1,1,1];
y=[1,1,1];
How can I find its convolution ?
1 commentaire
Image Analyst
le 4 Jan 2017
output = conv(x, y, 'full');
plot(output, 'bo-', 'LineWidth', 2);
grid on;
Sandeep Maurya
le 28 Août 2017
0 votes
x=input('Enter x: ') h=input('Enter h: ') m=length(x); n=length(h); X=[x,zeros(1,n)]; H=[h,zeros(1,m)]; for i=1:n+m-1 Y(i)=0; for j=1:m if(i-j+1>0) Y(i)=Y(i)+X(j)*H(i-j+1); else end end end Y stem(Y); ylabel('Y[n]'); xlabel('----->n'); title('Convolution of Two Signals without conv function');
Catégories
En savoir plus sur Measurements and Feature Extraction dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!