Equation for non linear model

2 visualizzazioni (ultimi 30 giorni)
Tania
Tania il 17 Giu 2014
Risposto: Roger Wohlwend il 17 Giu 2014
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!

Risposta accettata

Roger Wohlwend
Roger Wohlwend il 17 Giu 2014
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, ...).

Più risposte (0)

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by