Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Rayleigh quotient iteration
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Octave implementation == The following is a simple implementation of the algorithm in [[GNU Octave|Octave]]. <syntaxhighlight lang="matlab"> function x = rayleigh(A, epsilon, mu, x) x = x / norm(x); % the backslash operator in Octave solves a linear system y = (A - mu * eye(rows(A))) \ x; lambda = y' * x; mu = mu + 1 / lambda err = norm(y - lambda * x) / norm(y) while err > epsilon x = y / norm(y); y = (A - mu * eye(rows(A))) \ x; lambda = y' * x; mu = mu + 1 / lambda err = norm(y - lambda * x) / norm(y) end end </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)