mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-11-11 17:33:54 +01:00
11 lines
209 B
Mathematica
11 lines
209 B
Mathematica
function [err] = euklidesNorm(a,f,x)
|
|
p = polyval(a,x);
|
|
[s,~] = size(f);
|
|
i = 1;
|
|
sum=0;
|
|
while i<=s
|
|
sum = sum + (p(i)-f(i))^2;
|
|
i = i + 1;
|
|
end
|
|
err = sqrt((1/s)*sum);
|
|
end |