www.i4info.org

i4info Provides the best hacking Material. Latest hacking tutorials and tools are available here. It is the best place for hackers.

Latest topics

» Teen Patti Gold Hack & 3 Patti Chips Code Extra Bonus 2016
Sun Jan 15, 2017 10:13 pm by printexpk1

» SQL Dumper v.8.0
Fri Jan 13, 2017 10:18 pm by imsopickled

» Infographic Resume/CV Pack
Fri Jan 06, 2017 2:55 pm by Admin

» My Dear Love
Tue Jan 03, 2017 2:24 pm by Admin

» 2017 Calendar | One Page Calendar
Sun Jan 01, 2017 9:03 am by Admin

» Diagnosing Traffic Drops Using Google Analytics
Fri Dec 30, 2016 11:59 am by Admin

» British/UK Passport PSD
Thu Dec 29, 2016 4:03 pm by Admin

» PHP Mailer - Mass Emails All in inbox 2017
Thu Dec 29, 2016 3:55 pm by Admin

» How to Close any Facebook Account?
Wed Dec 28, 2016 10:51 am by Admin

January 2017

MonTueWedThuFriSatSun
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Calendar Calendar

Affiliates


free forum

Forumotion on Facebook Forumotion on Twitter Forumotion on YouTubeForumotion on Google+

Visitors Counter


Flag Counter

About Author

Muhammad Shahroze Rashid
i4info
Web Developer
Web Developer & Designer,Researcher and Technical writer. An Information Security Consultant and System Auditor, a keen Security researcher.
samanabad
lahore, Punjab
54000
Pakistan
shahrozerashid007@gmail.com
03064904829
DOB: 05/25/1992
Muhammad Shahroze Rashid
Muhammad Shahroze Rashid is a Web Developer and Designer, Android Developer, InfoGrapher, IT consultant and Researcher
Reviewed by Google
Google
Date published: 01/19/2016
9 / 10 stars
Muhammad Shahroze Rashid
Muhammad Shahroze Rashid Web Developer & Designer,Researcher and Technical writer. An Information Security Consultant and System Audito
samanabad
lahore
Punjab
54000
Pakistan

Convolution Calculator in MATLAB

Share

Admin
Admin

Posts : 469
Reputation : 6
Join date : 2014-12-10
Age : 24
Location : Pakistan

Convolution Calculator in MATLAB

Post by Admin on Tue Jun 07, 2016 12:23 am

CONVOLUTION CALCULATOR in MATLAB


Hi folks, i hope you are doing fine , Today I will share one of my MATLAB Projects. (convolution calculator in MATLAB).

--------------------------------------------------------------------------------------------------------------

  • MATLAB has an inherent command for convolution utilizing which we can undoubtedly discover the convolution of two capacities.


 

  • Sentence structure of this builtin convolution summon is v=conv(x,h) where x and h are the info capacities while v is our yield.


 

  • In my code I have utilized this builtin capacity and additionally I have likewise plan a little calculation for computing the convolution utilizing its equation.


 

  • Subsequent to finding both the convolutions, I have just thought about them by plotting them on diagram with the goal that we can likewise confirm that our outcome is right.


 

  • You can utilize this convolution number cruncher to discover convolution of any two capacities.


 

  • In this way, as a matter of first importance, duplicate this code and glue it in your m document and run it:


 
clc
close all
clear all


x=input('enter the sequence, x(n)=')
h=input('enter the sequence, h(n)=')

m=length(x);
n=length(h);
subplot(4,1,1)
stem(1:m,x,'fill','r')
grid on;
title('input sequence, x(n)=')
xlabel('time n------>')
ylabel('amplitude----->')

subplot(4,1,2)
stem(1:n,h,'fill','r')
grid on;
title('impulse sequence, h(n)=')
xlabel('time n------>')
ylabel('amplitude----->')
%------linear convolution using inbuilt command------------------------%

v=conv(x,h)
l=m+n-1;
subplot(4,1,3)
stem(1:l,v,'fill','r')
grid on;
title('output sequence using inbuilt command, v(n)=')
xlabel('time n------>')
ylabel('amplitude----->')
%--------linear convolution using 'for' loop------------------------------%

X=zeros(1,l);
H=zeros(1,l);
X(1:m)=x;
H(1:n)=h;
for i=1:l
Y(i)=0;
for j=1:i
Y(i)=Y(i)+X(j)*H(i-j+1);
end
end
Y
subplot(4,1,4)
stem(1:l,Y,'fill','r')
grid on;
title('output sequence using loop, Y(n)=')
xlabel('time n------>')
ylabel('amplitude----->')

 

  • The above code for convolution mini-computer is entirely clear as crystal however given me a chance to explain it a bit.


 

  • Above all else, I am requesting inputs from client and they are spared in variables named as x and h.


 

  • After that I am plotting them utilizing stem capacity.


 

  • In the following segment, I have utilized the default MATLAB summon for Convolution and figured the convolution of x and h and spared it in v.


 

  • Next I connected my straightforward calculation and ascertained convolution of x and h and spared it in Y furthermore plotted it.


 

  • When you run the recreation and give your info capacities, you will get the underneath results:


[You must be registered and logged in to see this link.]

  • You can find in the above assume that I have given two inputs x and h and MATLAB Convolution Calculator computed the convolution and gave us v and Y.


 

  • v is computed as a matter of course MATLAB order while the Y is ascertained by our little convolution calculation.


 

  • Their chart representation is appeared in the underneath figure:


[You must be registered and logged in to see this link.]

  • As, we have recognized two circles so the charge window is demonstrating the X, Y directions of both these circles alongside their radii.


 

  • Presently test it furthermore change the base and most extreme reaches and you will see you are going to identify more circles.


[divider style="dotted" top="20" bottom="20"]

For any kind of help and queries, Don't hesitate to comment below.

    Current date/time is Mon Jan 23, 2017 11:39 am