WUT_Computer_Science/ENUME/references/MNUM/Projekt2/Zadanie2/czebyszewNorm.m
2021-11-10 13:12:25 +01:00

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