Added \enterm command for highlighting english terms.
First improvements on regression chapter.
This commit is contained in:
@@ -5,16 +5,13 @@ load('lin_regression.mat');
|
||||
|
||||
slopes = -5:0.25:5;
|
||||
intercepts = -30:1:30;
|
||||
|
||||
error_surf = zeros(length(slopes), length(intercepts));
|
||||
|
||||
for i = 1:length(slopes)
|
||||
for j = 1:length(intercepts)
|
||||
error_surf(i,j) = lsqError([slopes(i), intercepts(j)], x, y);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
% plot the error surface
|
||||
figure()
|
||||
[N,M] = meshgrid(intercepts, slopes);
|
||||
@@ -25,7 +22,7 @@ zlabel('error')
|
||||
set(gca,'xtick', (-5:2.5:5))
|
||||
grid on
|
||||
view(3)
|
||||
|
||||
set(gcf, 'paperunits', 'centimeters', 'papersize', [15, 15], ...
|
||||
'paperposition', [0., 0., 15, 15])
|
||||
|
||||
saveas(gcf, 'error_surface', 'pdf')
|
||||
saveas(gcf, 'error_surface', 'pdf')
|
||||
|
||||
Reference in New Issue
Block a user