Equation for non linear model

3 次查看(过去 30 天)
Hi! I am trying to create a nonlinear model for my data at the moment using fitnlm. I have imported the data into matlab, but I am not quite sure how to define my equation. In the example in the documentation they had:
modelfun=@(b,x)b(1) + b(2)*x(:,1).^b(3)+b(4)*x(:,2).^b(5):
-> MPG ~ b1 + b2*Horsepower^b3 + b4*Weight^b5
How did they decide on this equation? Is their a certain technique?
Thank you!

采纳的回答

Roger Wohlwend
Roger Wohlwend 2014-6-17
I have no idea why Matlab chose to use that equation. They don't explain. In some cases theory suggests the relationship between the indepent and the dependent variables (for example in physics). But in many cases theory does not help you defining the equation. Then it can be very difficult to find the equation. It helps to plot the dependent variable as a function of each independent variable. Sometimes you can recognize a certain relationship between the two variables (linear, logarithmmic, exponential, ...).

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Numerical Integration and Differential Equations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by