Question: Write a function that returns the error between qhat and q as defined above. Hint: Your function should return values on the order of 1
Write a function that returns the error between qhat and as defined above.
Hint: Your function should return values on the order of for qhat and generated as below.
randn
orm
rand
qhat exp
@show rror ;
using LinearAlgebra: norm
function evecerrorqhat::AbstractVector, q::AbstractVector
@assert isapproxnormqhat "qhat is not of unit norm"
@assert isapproxnormqq is not of unit norm"
alpha qhat
error qhat
return error
end
Run
Verify Solution
X Code errored s
LoadError: syntax: invalid identifier name
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
