mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-11-11 13:27:38 +01:00
13 lines
257 B
Mathematica
13 lines
257 B
Mathematica
function [maxError] = czebyszewNorm(a,f,x)
|
|
p = polyval(a,x);
|
|
[s,~] = size(f);
|
|
i = 1;
|
|
maxError = 0;
|
|
while i<=s
|
|
err = abs(p(i)-f(i));
|
|
if err > maxError
|
|
maxError = err;
|
|
end
|
|
i = i + 1;
|
|
end
|
|
end |