I am trying use lsqlin to make a linear fit to some forestry data while applying two constraints on the output model. I have vectors of percentage of canopy coverage at varying heights assembled into a matrix [m (plots) x n (percent coverage at height bin k)] as the input independent variable, and the model is intended to predict above ground biomass measurements which are in a vector of length m measured plots. The two constraints I have are that the output be 0 at position 0, x(0) = 0 and that the output be non-decreasing.
It is unclear in the documentation of lsqlin on how to go about setting these constraints. I have used the backslash operator and lsqnonneg to create simple models, but they do not have the capability of adding these constraints that I have found.
Best Answer