Negative values in multiple regression
显示 更早的评论
Hey guys,
I got measured data (5 independent values and 1 which depends on the 5 independent ones) and want to create a function y = f(x1,x2,x3,x4,x5). I used nlinfit to do this and get a function which is okay but could be better. In addition, some of my dependent value y are negative, althouht the original resulting data CAN NOT be negative. Is there any possibility to tell nlinfit to find a function y = f(x1,x2,x3,x4,x5) where y is NEVER negative? In comparison to nlinfit, is there any better way do find a nonlinear function y = f(x1,x2,x3,x4,x5)?
2 个评论
John BG
2017-3-14
nlinfit uses some constant and 1 exponential for the approximation.
It may be useful for stiff functions approximation, but with periodic functions may be you would like to consider approximating with a combination of trigonometric functions.
Or may be polynomials would be a better choice.
What is the shape of the function you want to approximate, and over which range do you want it approximated?
John BG
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Linear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!