[regression] first part n-dim minimization
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
meansquarederrorline % generate data
|
||||
meansquarederrorline; % generate data
|
||||
|
||||
c0 = 2.0;
|
||||
eps = 0.0001;
|
||||
@@ -21,9 +21,8 @@ hold on;
|
||||
% generate x-values for plottig the fit:
|
||||
xx = min(x):0.01:max(x);
|
||||
yy = cest * xx.^3;
|
||||
plot(xx, yy, 'displayname', 'fit');
|
||||
plot(x, y, 'o', 'displayname', 'data'); % plot original data
|
||||
plot(xx, yy);
|
||||
plot(x, y, 'o'); % plot original data
|
||||
xlabel('Size [m]');
|
||||
ylabel('Weight [kg]');
|
||||
legend("location", "northwest");
|
||||
pause
|
||||
legend('fit', 'data', 'location', 'northwest');
|
||||
|
||||
Reference in New Issue
Block a user