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

📄 tanphi.m

📁 这是一个很适合研究和学习用的电力系统仿真软件
💻 M
字号:
function val = tanphi(a,idx)

val = [];
if ~a.n, return, end

if isnumeric(idx)
  p = a.con(idx,4);
  jdx = find(p == 0);
  if ~isempty(jdx), p(jdx) = 1; end
  val = a.con(idx,5)./a.con(idx,4);
  if ~isempty(jdx), val(jdx) = 1; end
elseif strcmp(idx,'all')
  p = a.con(:,4);
  jdx = find(p == 0);
  if ~isempty(jdx), p(jdx) = 1; end
  val = a.con(:,5)./a.con(:,4);  
  if ~isempty(jdx), val(jdx) = 1; end
end

⌨️ 快捷键说明

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