14 views (last 30 days)
Show older comments
Please,I want to do the convolution on my speech signal using conv() How can I do that??
This is my signal
Naz on 19 Dec 2011
First of all, this
is useless information because it will be rewritten anyway below, unless this information is given to you and you don't fully describe the required task. ASSUMING that your professor wants you to perform convolution of the recorded signal with itself, you can perform this:
s2 = conv(s1(1,:),s1(1,:)); %using all columns from the first row
Of course, the resulting signal will be nothing like the initial signal.
More Answers (2)
[conv(s1(:,1),s(:,1), 'same'), conv(s1(:,2), s1(:,2), 'same')]
That is for convolving each channel with itself. If for some reason you wanted to convolve left with right, then it would be
conv(s1(:,1), s1(:,2), 'same')
Timothy Dixon on 18 May 2012
@ sara correct the type error from walter conv(s1(:,1),s(:,1)
s1 was missing. if it does not work, then try to upgrade the version of Matlab that support the recording card system
Image Analyst on 19 Dec 2011
clc; % Clear the command window.
close all; % Close all figures (except those of imtool.)
imtool close all; % Close all imtool figures.
clear; % Erase all existing variables.
workspace; % Make sure the workspace panel is showing.
fontSize = 24;
fullFileName = 'C:\Users\N\Desktop\sara.wav';
if exist(fullFileName, 'file')
title('Original Signal', 'FontSize', fontSize);
windowSize = 201; % or whatever.
s1_filtered = conv(s1, ones(1, windowSize ) / windowSize );
title('Filtered Signal', 'FontSize', fontSize);
% Enlarge figure to full screen.
set(gcf, 'units','normalized','outerposition',[0 0 1 1]); % Maximize figure.
set(gcf,'name','Demo by ImageAnalyst','numbertitle','off')
message = sprintf('File not found:\n%s', fullFileName);
Find more on Digital Filtering 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!