Skip to content
Snippets Groups Projects
Commit d6a44d9b authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Cleanup / comments

parent f56a135e
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ b=[ ...@@ -13,7 +13,7 @@ b=[
1 1
2.5 2.5
]; ];
func = 'S'; % steepFunctionNonsmooth func = 'S'; % slope 1/100
x = -.1:.005:.4; x = -.1:.005:.4;
y = .9:.005:1.1; y = .9:.005:1.1;
...@@ -39,8 +39,7 @@ diffs = zeros(steps, 2); ...@@ -39,8 +39,7 @@ diffs = zeros(steps, 2);
vecs(1,:) = [0; 0]; % So that we can always calculate a difference vecs(1,:) = [0; 0]; % So that we can always calculate a difference
vecs(2,:) = [0; 1]; % Start vecs(2,:) = [0; 1]; % Start
for j = 2:steps+1 % Something random for j = 2:steps+1
% Zero is code for 'SteepFunctionNonsmooth'
vecs(j+1,:) = duneminimise(A,b,func,vecs(j,:)); vecs(j+1,:) = duneminimise(A,b,func,vecs(j,:));
diffs(j,:) = vecs(j+1,:) - vecs(j,:); diffs(j,:) = vecs(j+1,:) - vecs(j,:);
line([vecs(j,1) vecs(j+1,1)], ... line([vecs(j,1) vecs(j+1,1)], ...
......
...@@ -13,7 +13,7 @@ b=[ ...@@ -13,7 +13,7 @@ b=[
1 1
2 2
]; ];
func = 's'; % sampleFunction func = 's'; % slope 1/2
x = -50:1:300; x = -50:1:300;
y = -125:1:50; y = -125:1:50;
...@@ -39,8 +39,7 @@ diffs = zeros(steps, 2); ...@@ -39,8 +39,7 @@ diffs = zeros(steps, 2);
vecs(1,:) = [ 0; 0]; % So that we can always calculate a difference vecs(1,:) = [ 0; 0]; % So that we can always calculate a difference
vecs(2,:) = [279; 0]; % Start vecs(2,:) = [279; 0]; % Start
for j = 2:steps+1 % Something random for j = 2:steps+1
% One is code for 'SampleFunction'
vecs(j+1,:) = duneminimise(A,b,func,vecs(j,:)); vecs(j+1,:) = duneminimise(A,b,func,vecs(j,:));
diffs(j,:) = vecs(j+1,:) - vecs(j,:); diffs(j,:) = vecs(j+1,:) - vecs(j,:);
line([vecs(j,1) vecs(j+1,1)], ... line([vecs(j,1) vecs(j+1,1)], ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment