文件名称:生成节点导纳矩阵matlab
文件大小:1KB
文件格式:ZIP
更新时间:2022-05-18 16:43:27
节点导纳矩阵 matlab
function Y = CreateY(branchData) if nargin < 1 branchData = InputData(); end busf = branchData(:,1); bust = branchData(:,2); z = branchData(:,3); branchCount = length(busf); busCount = max([busf',bust']); Y = zeros(busCount); for n = 1:branchCount Y(busf(n),bust(n)) = Y(busf(n),bust(n))-1/z(n); Y(bust(n),busf(n)) = Y(busf(n),bust(n)); Y(busf(n),busf(n)) = Y(busf(n),busf(n))+1/z(n); Y(bust(n),bust(n)) = Y(bust(n),bust(n))+1/z(n); end end
【文件预览】:
InputData.m
CreateY.m