www.gusucode.com > rf 案例源码程序 matlab代码 > rf/AddResistorToCircuitAndDisplayPropertiesExample.m

    %% Add Resistor to Circuit and Display Properties
% Add a resistor to a circuit, display the parent path and parent nodes.

% Copyright 2015 The MathWorks, Inc.


hR = resistor(150,'R150');
hckt = circuit('resistorcircuit');
add(hckt,[1 2],hR)
setports(hckt, [1 0],[2 0])
disp(hR)