Model segmental linear regression

This one is more useful, as most piecewise regression needs a continuous joint! I tested it ,and it works!