answersLogoWhite

0

clc

clear all

close all

a = [1 2 3 4];

b = [6 7 8 9 10];

f=length(a);

g=length(b);

h=(f+g-1);

i=[a,zeros(1,(h-f))];

j=[b,zeros(1,(h-g))];

y1 = fft(i);

y2 = fft(j);

z = y1.*y2;

c = ifft(z);

subplot(2,2,1); plot(a)

title('a')

subplot(2,2,2); plot(b)

title('b')

subplot(2,2,3); plot(c)

title('Convolution of a,b')

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Convolution in matlab using for loop?

There are a lot of convolution functions in matlab, mostly in the signal processing toolbox, so it depends on what you want to do. Matlab has extensive help files available online.


How do you modulate in matlab without using matlab tools?

You would have to write your own code for a modulation (Matlab has a convolution function not in the tools), otherwise you can use its built in function in the signal processing toolbox.


What is a sentence using convolution?

gyiuhkjhkj


Does matlab talk?

Yes, it is possible to make matlab talk in Windows using a simple program that can be downloaded here: http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=15890&objectType=FILE If you are using a mac, or unix then there may be other ways to make matlab talk, but the basic code will be quite similar. Have fun. Ed


How to generate multi component sine wave signal by using matlab program?

Generating Sine and Cosine Signals (Use updated lab)


How do you make graph from an equation in Matlab?

Initially, the equation can be directly realized using Matlab source code. Then various inputs can be applied to it. These values can easily be plotted on a graph using plot or stem command in Matlab.


How do you implement awgn in MATLAB without using awgn function?

no way... use awgn function in matlab


What is the difference between continuous and discrete convolution?

A convolution is a function defined on two functions f(.) and g(.). If the domains of these functions are continuous so that the convolution can be defined using an integral then the convolution is said to be continuous. If, on the other hand, the domaisn of the functions are discrete then the convolution would be defined as a sum and would be said to be discrete. For more information please see the wikipedia article about convolutions.


How do you call matlab from java?

You can MATLAB from Java by using the matlabcontrol library available at link1. A walkthrough to get you started can be found at link2


How to do a password using vhdl?

A VHDL program can be written to provide a password in the following ways.Using FPGA:Your program can be dumped into a FPGA. This works as per the program written. As the code is burned into it, the user can not see the code. Now, within your program you can have a conditional statement which serves as your password. For example,if (c=ramarav) then...................................................................Using CPLD:It also works in the similar manner.Using a GUI:We can implement a graphical user interface, but the easier way is to take the help of MATLAB tool. We can implement our VHDL code in MATLAB tool and it serves the purpose.


How can the wave equation be solved using MATLAB?

To solve the wave equation using MATLAB, you can use numerical methods such as finite difference or finite element methods. These methods involve discretizing the wave equation into a system of equations that can be solved using MATLAB's built-in functions for solving differential equations. By specifying the initial conditions and boundary conditions of the wave equation, you can simulate the behavior of the wave over time using MATLAB.


How can I programmatically stop a MATLAB script execution using a single command in MATLAB?

To programmatically stop a MATLAB script execution using a single command, you can use the "return" command. This command will immediately exit the current function or script, effectively stopping its execution.