Linear fit in a jumping window

1 visualizzazione (ultimi 30 giorni)
Plastic Soul
Plastic Soul il 12 Nov 2014
Modificato: Plastic Soul il 13 Nov 2014
Hi everyone,
What I need to do is a linear fit of a certain part of my dataset. It would work like a window, fitting a certain part of the signal, and then jumps to the next part to fit it, and so on. So I did a loop of polyfit (first order). Does anyone have any suggestions on a simple example?
When I try my code using polyfit (first order) to get coefficients, for each window jump, I get this error (but it works even with this error):
In polyfit at 75
Warning: Polynomial is badly conditioned. Add points with distinct X values,
reduce the degree of the polynomial, or try centering and scaling as described
in HELP POLYFIT.
What do you think this error is trying to tell me?
Thank you.

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by