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.
|
%% Exercício 14
|
|
|
|
function RefN = DiogoEliseuHugo_TP1_14(X)
|
|
N = 1:size(X, 2);
|
|
ref = [sin(N); exp(N); exp(-N); N; -N; N.^2];
|
|
maxim = [];
|
|
|
|
for s = ref'
|
|
Vmax = DiogoEliseuHugo_TP1_13(X, s', 1);
|
|
maxim = [maxim Vmax];
|
|
end
|
|
|
|
m = max(maxim);
|
|
RefN = find(maxim == m, 1);
|
|
end
|