Stuart’s MATLAB Videos

Watch and Learn

Piecewise linear curve fitting

This week, I am getting back to my blogging roots and I want to highlight (and thank)John D’erricofor a great file Exchange submission. That file isShape Language Modeling.

Recently I had some very noisy data that I wanted to fit a curve to. The problem is there were different regions that were somewhat linear, but the overall data was far from linear. A spline or a polynomial did not capture the behavior in a global sense. What I wanted was the ability to fit a line to each region. SLM does that right out of the box.

我认为这是非常有益的,看看这个code was packaged up. There is a clearly labeled tutorial that was easy to scan looking for an example like what I wanted to do. All of the files have lots of comments. sometimes more comments that code I think. The files are named coherently so they make a nice package. These are all great things to make a package that other people can use.

|
  • print
  • send email

Comments

To leave a comment, please clickhereto sign in to your MathWorks Account or create a new one.