# Answered! I need MATLAB code for this problem Let a = 5, b = 1…

I need MATLAB code for this problem

Let a = 5, b = 1

Don't use plagiarized sources. Get Your Custom Essay on
Answered! I need MATLAB code for this problem Let a = 5, b = 1…
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS \$13/PAGE

copyable code:

clc

clear all

close all

a = 5;

b = 1;

t1 = -1;

t2 = 1;

t = t1:0.01:t2;

x = ((a+1)*(1-t)+(b+1)*(1+t)).*(heaviside(t+1)-heaviside(t-1))/(sqrt(2)*(a+b+2));

y2 = conv(x,x);

subplot(2,1,1)

plot(t,x)

title(‘x’)

subplot(2,1,2)

plot(t1*2:0.01:t2*2,y2)

title(‘y2’)

%% 2)

y4 = conv(y2,y2);

y8 = conv(y4,y4);

y16 = conv(y8,y8);

figure()

subplot(3,1,1)

plot(t1*4:0.01:t2*4,y4)

title(‘y4’)

subplot(3,1,2)

plot(t1*8:0.01:t2*8,y8)

title(‘y8’)

subplot(3,1,3)

plot(t1*16:0.01:t2*16,y16)

title(‘y16’)

%%3)

z4 = sqrt(-1*log(y4/max(y4)));

z8 = sqrt(-1*log(y8/max(y8)));

z16 = sqrt(-1*log(y16/max(y16)));

figure()

subplot(3,1,1)

plot(t1*4:0.01:t2*4,z4)

title(‘z4’)

subplot(3,1,2)

plot(t1*8:0.01:t2*8,z8)

title(‘z8’)

subplot(3,1,3)

plot(t1*16:0.01:t2*16,z16)

title(‘z16’)

%% 4)

diff1 = diff(z4);

diff2 = diff(z8);

diff3 = diff(z16);

figure()

subplot(3,1,1)

plot(t1*4:0.01:t2*4-0.01,diff1)

title(‘Z4’)

subplot(3,1,2)

plot(t1*8:0.01:t2*8-0.01,diff2)

title(‘Z8’)

subplot(3,1,3)

plot(t1*16:0.01:t2*16-0.01,diff3)

title(‘Z16’)