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

    %% Create Circuit with Elements and Terminals
% Create a circuit called new_circuit. Add a resistor and capacitor to the
% ciruit. Set the terminals and display the results.

% Copyright 2015 The MathWorks, Inc.


hckt = circuit('new_circuit1');
hC1= add(hckt,[1 2],capacitor(3e-9));
hR1 = add(hckt,[2 3],resistor(100));
setterminals (hckt,[1 3]);
disp(hckt)