Equation for non linear model

조회 수: 3 (최근 30일)
Tania
Tania 2014년 6월 17일
답변: Roger Wohlwend 2014년 6월 17일
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