Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Conor Joseph Mccoid
UNIGE
Commits
07fa4a21
Commit
07fa4a21
authored
Nov 22, 2021
by
Conor McCoid
Browse files
Extrap: playing around with Householder version for overdetermined systems
parent
ebecf0cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Research/Extrapolation methods/Code/ALGO_extrap_MPE_v3_20211119.m
View file @
07fa4a21
...
...
@@ -6,13 +6,19 @@ function [x_out,r_out]=ALGO_extrap_MPE_v3_20211119(F,X)
R
=
F
;
H
=
zeros
(
d
,
k
);
%I=eye(d); Q=I;
x_out
=
zeros
(
d
,
k
);
r_out
=
zeros
(
k
,
1
);
x_out
(:,
1
)
=
X
(:,
1
);
r_out
(
1
)
=
norm
(
F
(:,
1
));
for
i
=
1
:
min
(
d
,
k
)
w
=
SUB_extrap_Householder_v1_20211119
(
R
(:,
i
),
i
);
for
i
=
1
:
k
if
i
<=
d
w
=
SUB_extrap_Householder_v1_20211119
(
R
(:,
i
),
i
);
% Q = Q - 2*Q*(w*w');
R
=
R
-
2
*
(
w
*
w
'
)
*
R
;
R
=
R
-
2
*
(
w
*
w
'
)
*
R
;
end
if
i
>
1
H
(
1
:
i
-
1
,
i
-
1
)
=
R
(
1
:
i
-
1
,
i
)
-
R
(
1
:
i
-
1
,
i
-
1
);
H
(
i
,
i
-
1
)
=
R
(
i
,
i
);
u
=
zeros
(
i
-
1
,
1
);
u
(
1
)
=-
R
(
1
,
1
);
u
=
H
(
1
:
i
-
1
,
1
:
i
-
1
)\
u
;
ind
=
1
:
min
(
i
-
1
,
d
);
H
(
ind
,
i
-
1
)
=
R
(
ind
,
i
)
-
R
(
ind
,
i
-
1
);
if
i
<=
d
H
(
i
,
i
-
1
)
=
R
(
i
,
i
);
end
u
=
zeros
(
min
(
i
-
1
,
d
),
1
);
u
(
1
)
=-
R
(
1
,
1
);
u
=
H
(
ind
,
1
:
i
-
1
)\
u
;
u
=
[
1
;
u
]
-
[
u
;
0
];
x_out
(:,
i
)
=
X
(:,
1
:
i
)
*
u
;
r_out
(
i
)
=
norm
(
F
(:,
1
:
i
)
*
u
);
...
...
Research/Extrapolation methods/Code/EX_extrap_linearFPI_v1_20211022.m
View file @
07fa4a21
% Example - Extrapolation: fixed point iteration on linear function
% solve the equation x = Ax + b for random A and b
d
=
4
0
;
n
=
2
*
d
;
d
=
1
0
;
n
=
2
*
d
;
A
=
rand
(
d
);
A
=
A
/
norm
(
A
);
%
A = A/norm(A);
b
=
rand
(
d
,
1
);
x_true
=
-
(
A
-
eye
(
d
))
\
b
;
X
=
b
;
for
i
=
1
:
n
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment