How to do regression between three inputs (x1, x2 and x3) and one outputs (y) using Curve Fitting?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How to do regression between three inputs (x1, x2 and x3) and one outputs (y) using Curve Fitting? The Cuve fittinng show only regression between x1, x2 inputs and z outputs
0 Kommentare
Antworten (2)
Star Strider
am 8 Jun. 2015
I don’t have the Curve Fitting Toolbox (Statistics and Optimization instead), so I can’t address the Curve Fitting Toolbox specifically. However it is straightforward to do this with the other functions, by combining the three vectors into one matrix, then addressing them appropriately in your objective function:
x123 = [x1(:), x2(:), x3(:)];
y = [column vector with the same row size as ‘x123’];
f = @(b,x) b(1).*x123(:,1).^b(2) + b(3).*x123(:,2) + x123(:,3); % Example Objective Function
B0 = [choose vector of initial parameter estimates];
B = nlinfit(x123,y,f,B0); % Estimate Parameters
You will have to experiment with the Curve Fitting Toolbox, but since it can use custom objective functions, something like this should work.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!