sir i have a sinosoidal signal and i want to fit the curve which cover the maximum data of that by using polyfit or polyval instruction how can i...????
Show older comments
a = [0 -1.43061558801942 0.449553769638651 0.563052881824671 0.363537935922275 -2.28756758511472 -2.50357386946423 2.45670867493125 0.736842277715324 -0.299156918582553 -1.75540037385161 -2.79669516937493 -0.971720745073923 1.37255636093699 -0.0290079071439933 2.08934318334818 -1.42051382069485 -0.814504230177740 -0.524025208712882 0.482095001546964 0.525768700476486 2.88990062408454 1.46331243352935 -2.01196953374551 1.00986418982086 -0.367421904619802 0.0861523640802418 -1.16560335109761 1.54038555516689 0.628936203561307 -1.23174384730983 0.366243532626739 0.0703495321510657 2.35750626082822 1.33190490985333 1.20560659136848 -1.80854560120597 -0.473883277855066 0.473883277855066 1.80854560120597 -1.20560659136848 -1.33190490985333 -2.35750626082822 -0.0703495321510657 -0.366243532626739 1.23174384730983 -0.628936203561307 -1.54038555516689 1.16560335109761 -0.0861523640802418 0.367421904619802 -1.00986418982086 2.01196953374551 -1.46331243352935 -2.88990062408454 -0.525768700476486 -0.482095001546964 0.524025208712882 0.814504230177740 1.42051382069485 -2.08934318334818 0.0290079071439933 -1.37255636093699 0.971720745073923 2.79669516937493 1.75540037385161 0.299156918582553 -0.736842277715324 -2.45670867493125 2.50357386946423 2.28756758511472 -0.363537935922275 -0.563052881824671 -0.449553769638651 1.43061558801942]
Answers (1)
Star Strider
on 8 Feb 2016
0 votes
I would not use polyfit. You can fit it with core MATLAB functions and get all the relevant parameter estimates using the techniques in Curve Fitting To a Sinusoidal Function.
Categories
Find more on Interpolation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!