2.85714

2.9 | 7 ratings Rate this file 32 Downloads (last 30 days) File Size: 1.35 KB File ID: #23402

CONVOLUTION IN MATLAB WITHOUT USING conv(x,h)

by imran shezad

 

23 Mar 2009

enter x=[ ]; % enter in brackets enter h=[ ]

| Watch this File

File Information
Description

A GENERALAZED CONVOLUTION COMPUTING CODE IN MATLAB WITHOUT USING MATLAB BUILTIN FUNCTION conv(x,h)

MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (8)
23 Mar 2009 Duane Hanselman

The content of the M-file is:
% A GENERALAZED CONVOLUTION COMPUTING CODE IN MATLAB WITHOUT USING MATLAB BUILTIN FUNCTION conv(x,h)
close all
clear all
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');

24 Mar 2009 Jos (10584)

A typical example of a file that has no use for others, written in poor C-style code. Do not bother to download!

27 Mar 2009 imran shezad  
14 Jul 2010 ROHIT ALHAT

good job man.....

30 Jun 2011 jyotibasu yaranal

fine..

23 Sep 2011 hamsa dhia

good gob well done

12 Oct 2011 Tim

Why are there two inputs, x and h?

20 Jan 2012 Mohit Gaur  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
communications imran shezad 23 Mar 2009 14:10:27

Contact us at files@mathworks.com