convolution of two signals

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.

Respuestas (4)

José-Luis
José-Luis el 12 de Jun. de 2014

0 votos

You could use the conv() function. It seems to do exactly what you want.
conv(x,y)
Please read the documentation.
doc conv

4 comentarios

Yuvashree Mani Urmila
Yuvashree Mani Urmila el 12 de Jun. de 2014
how to represent the waveforms with x and y values as signals in matlab. i have to import the data from excel. I have four columns of data with x and y values of two signals. Thanks for your help
José-Luis
José-Luis el 12 de Jun. de 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
Yuvashree Mani Urmila el 13 de Jun. de 2014
thanks for your help after importing the data i have four sets of values. but in conv function i have to input the two signals(signal 1 and signal 2) i suppose. but how to represent the x and y values as signal 1 and signal 2
José-Luis
José-Luis el 13 de Jun. de 2014
Use conv() two times? I am sorry but I don't understand.

Iniciar sesión para comentar.

Image Analyst
Image Analyst el 13 de Jun. de 2014

0 votos

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
Shahin Alam el 4 de En. de 2017
Editada: Image Analyst el 4 de En. de 2017

0 votos

x=[1,1,1];
y=[1,1,1];
How can I find its convolution ?

1 comentario

output = conv(x, y, 'full');
plot(output, 'bo-', 'LineWidth', 2);
grid on;

Iniciar sesión para comentar.

Sandeep Maurya
Sandeep Maurya el 28 de Ag. de 2017

0 votos

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');

Categorías

Más información sobre Measurements and Feature Extraction en Centro de ayuda y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Preguntada:

el 12 de Jun. de 2014

Respondida:

el 28 de Ag. de 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by