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

» BitCoin Wallet stealor New
Yesterday at 7:46 pm by Admin

» Muhammad Shahroze Rashid | Marketing Consultant
Yesterday at 1:48 pm by Admin

» Muhammad Shahroze Rashid | Sharp Mind, Sharp Innovations
Yesterday at 1:47 pm by Admin

» How to design an effective job ad
Yesterday at 1:45 pm by Admin

» Teen Patti Gold Hack & 3 Patti Chips Code Extra Bonus 2016
Tue Dec 06, 2016 4:38 am by shoytan er lara

» Content Marketing | Promotional Video
Fri Dec 02, 2016 2:45 pm by Admin

» How to start an Online Business | Complete Guide
Fri Dec 02, 2016 2:30 pm by Admin

» Zeeshan Bhatti
Wed Nov 30, 2016 3:18 pm by Admin

» USAA letter for scam page
Tue Nov 29, 2016 4:20 am by Hardyjsh1966

December 2016

MonTueWedThuFriSatSun
   1234
567891011
12131415161718
19202122232425
262728293031 

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
[email protected]
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 : 455
Reputation : 5
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 Thu Dec 08, 2016 10:52 am