MATLAB: Is there a regression-style interpolation in any lookup table in Simulink 6.2 (R14SP2)

curvefittinglinefitpolyfitregressionsimulink

I have some data points that I would like to use in a lookup table. However, I do not want the lookup table to interpolate between every point. Instead, I would like to do a regression-style fit where not every data point is actually intersected by the resulting line.

Best Answer

This enhancement has been incorporated in Release 2006a (R2006a). For previous product releases, read below for any possible workarounds:
The ability to use a lookup table to do a regression-style fit is not available in Simulink.
To workaround around this issue, you can use the POLYFIT function in an Embedded MATLAB Function Block. Note that POLYFIT is not supported for code generation. To learn more about the POLYFIT function, type the following at the MATLAB Command Prompt:
doc polyfit