www.gusucode.com > rf 案例源码程序 matlab代码 > rf/AddTwoCircuitsTogetherExample.m
%% Add Two Circuits Together % Create circuit 1 and set the terminals using the *setterminals* % functions. hckt1 = circuit('circuit_new1'); add(hckt1,[1 2], resistor(100)); setterminals(hckt1, [1 2]); disp(hckt1); %% % Create circuit 2 and set the terminals. hckt2 = circuit('circuit_new2'); add(hckt2, [3 4], capacitor(1.5e-9)); setterminals(hckt2, [3 4]); disp(hckt2); %% % Add the two circuits. add(hckt1, [2 4], hckt2); disp(hckt2) disp(hckt1)