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

    %% Create a Circuit and Define Its Nodes as Terminals
% Create a circuit names *new_circuit1*.
hckt1 = circuit('new_circuit1');

%%
% Add a resistor and capacitor to the circuit. 
add(hckt1,[1 2],resistor(50));
add(hckt1,[2 3],capacitor(1e-9));

%%
% Set the terminals of the circuit.
setterminals(hckt1,[1 3])
disp(hckt1)