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/TP1b/DiogoEliseuHugo_TP2_14.m

15 lines
317 B
Mathematica
Raw Normal View History

2020-10-24 22:38:49 +01:00
%% Exercício 14
function RefN = DiogoEliseuHugo_TP2_14(X)
N = 1:size(X, 2);
ref = [sin(N); exp(N); exp(-N); N; -N; N.^2];
maxim = [];
for s = ref'
Vmax = DiogoEliseuHugo_TP2_13(X, s', 1);
maxim = [maxim Vmax];
end
m = max(maxim);
RefN = find(maxim == m, 1);
end