This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
DSP/TP1/DiogoEliseuHugo_TP1_6.m

9 lines
163 B
Mathematica
Raw Normal View History

2020-10-05 22:52:47 +01:00
%% Exercício 6
2020-12-14 03:10:51 +00:00
function er = DiogoEliseuHugo_TP1_6(X1,X2)
2020-10-05 22:52:47 +01:00
er = norma(X2-X1,2) / norma(X1,2);
end
function s = norma(X, P)
s = sum(abs(X).^P).^(1/P);
2020-10-08 15:32:24 +01:00
end