IDNLearn.com is designed to help you find reliable answers quickly and easily. Whether it's a simple query or a complex problem, our experts have the answers you need.

Write a MATLAB function which implements the Rayleigh-Quotient iteration for eigen values and eigen vector calculation. The function call must be [l,v] = function_name(A, v0), where A is a real and square matrix, v0 is the initial vector, l is the resulting eigenvalue, and v is the associated eigenvector.
In the code use a tolerance of 10^(-8) and be sure to normalize v0 ( it might not be a unit vector). You are allowed to use the following MATLAB functions: dot, norm, eye, abs and either inv or the slash operator.