# Question: show the matlab code used to plot both functions a...

###### Question details

Show the MATLAB code used to plot both functions

a) y = 5 cos (pi*t – pi*x) (V)

f=0.5 Hz, λ=2cm, phase angle = 0

b) y = 5 e^(-αx) cos (2pift-2pix/λ) (V)

f=0,803 Hz, λ=2.874cm, pjase angle = 0

Use the frequency, wavelength and attenuation shown in the figure below when plotting graph b)

Place labels for the x and y axis showing appropriate units.

Extend the x-axis to 10 cm and use a sampling rate of 0.1 mm.