1.33333

1.3 | 3 ratings Rate this file 78 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

Code covered by BSD License  

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

Download Now | 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 (3)
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  
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
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com