Question
1) In computer assignement 1, you had to do filtering/convolution manually we dont normally do this. Now, you can use the build-in Matlab function conv
1) In computer assignement 1, you had to do filtering/convolution manually we dont normally do this. Now, you can use the build-in Matlab function conv to actually do the convolution. Given f1(x) = f2(x) = 1 2 x 1 2 e x 2 x [0, +) use Matlab to compute y(x) = f1(x) ~ f2(x). The easy part of this is the actual convolution just use the Matlab function conv. The (somewhat) tricky part is getting the scaling and support of y(x) correct. To this end, note that the functions f1(x) and f2(x) are actually the probability density functions for a chi-squared random variable with 1 degree of freedom; convolving the two of them will produce a chi-squared random variable with 2 degrees of freedom, which is the same thing as an exponential PDF with a mean of 2. You can look up what this expression is; even without it, just knowing it is a PDF tells you that your result should 1) be real everywhere, 2) be non-negative everywhere, and 3) integrate to 1. Repeat the above for f3(x) = 1 2 (x + 3) 1 2 e (x+3) 2 x [3, +) and f4(x) = 1 2 (x + 4) 1 2 e (x+4) 2 x [4, +) Compute y2(x) = f3(x) ~ f4(x). For this problem, turn in working Matlab code, as well as plots for y(x) and y2(x). The plots should be properly scaled and indexed i.e. this is more than just plot(conv(f1,f2))
MATLAB code only please. Thanks!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started