gcall.m

来自「用于电力系统的一个很好的分析软件」· M 代码 · 共 20 行

M
20
字号
function gcall(a)if ~a.n, return, endglobal DAE SettingsV = DAE.y(a.vbus);if Settings.init  DAE.g = DAE.g + ...          sparse(a.bus,1,DAE.lambda*a.u.*a.con(:,4).*V.^a.con(:,6),DAE.m,1) + ...          sparse(a.vbus,1,DAE.lambda*a.u.*a.con(:,5).*V.^a.con(:,7),DAE.m,1);elseif ~isempty(a.init)  i = a.init;  DAE.g = DAE.g + ...          sparse(a.bus(i),1,DAE.lambda*a.u(i).*a.con(i,4).*V(i).^a.con(i,6),DAE.m,1) + ...          sparse(a.vbus(i),1,DAE.lambda*a.u(i).*a.con(i,5).*V(i).^a.con(i,7),DAE.m,1);end

⌨️ 快捷键说明

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