Started statistics lecture

This commit is contained in:
2015-10-15 18:18:56 +02:00
parent 78ce93cb37
commit 06016d3e2f
149 changed files with 1015 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
param0 = [1,1];
step = 0.01;
m = 50;
arange = linspace(0,1,m);
brange = linspace(.5,1.5, m);
[A,B] = meshgrid(arange, brange);
E = 0*A;
x = linspace(-5,5,20);
y = .5*x + 1 + randn(1, length(x));
U = 0*A;
V = 0*A;
for i = 1:m
for j = 1:m
E(i,j) = lserr([A(i,j), B(i,j)], x, y);
grad = lserr_gradient([A(i,j), B(i,j)], x, y);
U(i,j) = grad(1);
V(i,j) = grad(2);
end
end
colormap('jet');
surf(A,B,E, 'FaceAlpha',.5);