Matlab Question – please show code. Thanks.
Complete the implementation of the dampedOsc function, whichplots a graph showing the function y = e−0.5x cos(1x) ranging from 0to 3π using the fplot function.
The curve should be displayed using a red dashedline.
This is what i tried:
function sinePlot(amplitude,period,phase)
fplot(@(x)amplitude*sin
(x+phase),[0,2*period],’m.-‘)
sinePlot(2,10,1) – WRONG.
Function Template
function dampedOsc()
% INSERT_CODE_HERE
end
Expert Answer
An answer will be send to you shortly. . . . .