Question: 7) Write a MATLAB program to fit an exponentially decaying signal. The signal ( ydata ) can be simulated using the following sequence of commands

7)

Write a MATLAB program to fit an exponentially decaying signal. The signal (ydata) can be simulated using the following sequence of commands (the code below generates the signal and adds noise):

tdata=linspace(0,10,100); a=500; b=2; c=40; ydata=a*exp(-tdata/b)+c; sigma=30; % standard dev. of noise ydata=ydata+sigma*randn(size(ydata)); figure;plot(tdata,ydata,o-); 

You are allowed to use the following built-in MATLAB commands to fit the data: fit, fminsearch, fminbnd, fminunc, fmincon, lsqnonlin, lsqcurvefit. You are not allowed to use graphical user interfaces such as cftool .

Thank you!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!