Question

MATLAB only Use MATLAB to Plot the different representations of the Dirac Delta Function δ(x). Provide...

MATLAB only

Use MATLAB to Plot the different representations of the Dirac Delta Function δ(x). Provide FIGURES.

Homework Answers

Answer #1

Plot for different representations:

f1(blue), f2(red), f3(yellow), where functions are defined in MATLAB code below:

MATLAB Code:

x = linspace(-0.5,0.5,1000);
f1=zeros(1,1000);
f2=zeros(1,1000);
f3=zeros(1,1000);


e=0.04;
for i=1:1000
    if(x(i)>-e)&&(x(i)<e)
        f1(i)=1.0/(2.0*e);
    else
        f1(i)=0.0;
    end
end
plot(x,f1)

hold on;

e=0.001;
for i=1:1000
    f2(i)=exp(-(x(i)*x(i))/(2*e))/sqrt(2*pi*e);
end
plot(x,f2)

hold on


hold on;

e=0.001;
for i=1:1000
    f2(i)=exp(-abs(x(i))/e)/sqrt(2*e);
end
plot(x,f2)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write down the Fermi Dirac distribution function. Use Mathematica to plot the distribution function against energy...
Write down the Fermi Dirac distribution function. Use Mathematica to plot the distribution function against energy for 0K, 5K,10K, 20K, 40K, 80K, an 160K.
Use the Laplace transform to solve the following IVP y′′ +2y′ +2y=δ(t−5) ,y(0)=1,y′(0)=2, where δ(t) is...
Use the Laplace transform to solve the following IVP y′′ +2y′ +2y=δ(t−5) ,y(0)=1,y′(0)=2, where δ(t) is the Dirac delta function.
Show all steps please Using Matlab: Generate a random signal ‘x’ with a length of 8000...
Show all steps please Using Matlab: Generate a random signal ‘x’ with a length of 8000 and sampling rate of 8kHz. Plot a section of the signal In the time domain. Is it possible to observe significant trends in the time domain signal? Plot the magnitude of the DFT of segments of ‘x’ of different lengths. Use a decibel scale for the vertical axis. What do you observe as the segment length increases? Use the Matlab function ‘periodogram’ to obtain...
Using Matlab to solve the problem below Given X=[-2 -1 0 1 2] Y=[1.5 3.2 4.5...
Using Matlab to solve the problem below Given X=[-2 -1 0 1 2] Y=[1.5 3.2 4.5 3.4 2] a). Plot a scatter plot of the data b). Determine the coefficients of the polynomial ?0 + ?1? + ?2?2 which best fits the data c). Plot this function on the same plot as in part ‘a’. USE MATLAB CODE ONLY! USE MATLAB CODE ONLY! THANK YOU
2) (USE MATLAB) Create a function called g that satisfies the following criteria. (Hint: Find function)...
2) (USE MATLAB) Create a function called g that satisfies the following criteria. (Hint: Find function) For x < -π                    g(x) = -1 For x ≥ -π and x ≤ π    g(x) = cos(x) For x >π                      g(x) = -1 Plot your results for values of x from -2p to +2p. Choose your spacing to create a smooth curve.
Write a Matlab program to plot the cosine wave. That is plot y=cos(k1x) vs. x for...
Write a Matlab program to plot the cosine wave. That is plot y=cos(k1x) vs. x for x varying from 0 to 2pi radians. The value of k1 is given at the end of this document. You can choose the increment for x. Note that large values of the increment will give you a coarse graph. Note: Matlab has two functions to calculate the sine of an angle: sin(x) and sind(x). What is the difference between these two functions? Use help...
You can use dsolve in MATLAB...run simplify(...) on the solution...You should plot the homogeneous and the...
You can use dsolve in MATLAB...run simplify(...) on the solution...You should plot the homogeneous and the inhomogeneous solutions on the same graph, using the "plot" function of MATLAB. set the arbitrary constants to 1 Consider the homogeneous equation y'' + 3y' + 2y = 0. a) Solve it and set the c's to 1. Graph this transient solution using large dots in MATLAB. b) Now add on the right-hand side the linear term 12x. Solve the inhomogeneous equation y'' +...
Use Matlab to solve the following (a) Create a plot with a sphere at the center...
Use Matlab to solve the following (a) Create a plot with a sphere at the center of the graph (origin) representing the sun with a radius of 6955000 km. Make sure that the outside of the sphere is painted in ’autumn’ colors. (Hint: look up the sphere() function, the colormap() function, and the surf() function). (b) Create a variable t ranging from 0 to 2? with increments of 0.01. (c) The following Table gives you important values needed to compute...
Write a MATLAB code to plot a contour graph of f(x, y) = x^2 + y^2...
Write a MATLAB code to plot a contour graph of f(x, y) = x^2 + y^2 for −2 ≤ x ≤ 2 and −3 ≤ y ≤ 3. Use the interval of 0.1 in the grid.
Use ε − δ definition to prove that the function f (x) = 2x/3x^2 - 2...
Use ε − δ definition to prove that the function f (x) = 2x/3x^2 - 2 is continuous at the point p = 1.