getxy.m
来自「电力系统分析计算程序」· M 代码 · 共 37 行
M
37 行
function [x,y] = getxy(a,bus,x,y)global Sssc Statcom Svc Tcsc Upfcif ~a.n, return, endtype = a.con(:,4);a1 = find(type == 1);a2 = find(type == 2);a3 = find(type == 3);a4 = find(type == 4);a5 = find(type == 5);h = zeros(a.n,1);h(a1) = ismember(Svc.bus(a.con(a1,2)),bus);h1 = ismember(Tcsc.bus1(a.con(a2,2)),bus); h2 = ismember(Tcsc.bus2(a.con(a2,2)),bus); h(a2) = h1+h2;h(a3) = ismember(Statcom.bus(a.con(a3,2)),bus);h1 = ismember(Sssc.bus1(a.con(a4,2)),bus); h2 = ismember(Sssc.bus2(a.con(a4,2)),bus); h(a4) = h1+h2;h1 = ismember(Upfc.bus1(a.con(a5,2)),bus); h2 = ismember(Upfc.bus2(a.con(a5,2)),bus); h(a5) = h1+h2;h = find(h);if ~isempty(h) x = [x; a.v1(h); a.v2(h); a.v3(h); a.Vs(h)];end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?