givapp.m

来自「This folder contains all the codes based」· M 代码 · 共 17 行

M
17
字号
function vrot=givapp(c,s,vin,k)%  Apply a sequence of k Givens rotations, used within gmres codes% %  C. T. Kelley, July 10, 1994%% This code comes with no guarantee or warranty of any kind.%%  function vrot=givapp(c, s, vin, k)%vrot=vin;for i=1:k    w1=c(i)*vrot(i)-s(i)*vrot(i+1);%    w2=s(i)*vrot(i)+c(i)*vrot(i+1);    w2=s(i)*vrot(i)+conj(c(i))*vrot(i+1);    vrot(i:i+1)=[w1,w2];end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?