ex6: I tried with exacmple C

This commit is contained in:
Gundolf Haase 2026-01-15 15:01:32 +01:00
commit 7bb12631aa
4 changed files with 15 additions and 2 deletions

View file

@ -3,7 +3,8 @@ N = length(x);
w = abs(eta_elem) + 1e-10; %error based monitor function
s = zeros(N,1);
for i = 2:N
s(i) = s(i-1) + w(i-1); %cumulative sum
s(i) = s(i-1) + w(i-1); %cumulative sum % LP
% s(i) = s(i-1) + w(i); %cumulative sum % GH
end
s = s / s(end); % normalize to [0,1]
s_new = linspace(0,1,N)';