⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qrtheta.m

📁 Mathematical Methods by Moor n Stiling.
💻 M
字号:
function [c,s] = qrtheta(x,y)
% 
% Given x and y, compute cos(theta) and sin(theta) for a Givens rotation
%
% function [c,s] = qrtheta(x,y)
%
% (x, y) = point to determine rotation
%
% c = cos(theta),   s=sin(theta)

% Copyright 1999 by Todd K. Moon

if y == 0
  c=1; s=0;
else
  if(abs(y) > abs(x))
    t = -x/y; s = 1/sqrt(1+t^2); c = s*t;
  else
    t = -y/x; c = 1/sqrt(1+t^2); s = c*t;
  end
end

⌨️ 快捷键说明

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