Creating multiple circuit using same nport RF object in MATLAB with different node assignment?

2 views (last 30 days)
I am trying to create multiple circuit using same RF objects having with different topology but getting an error shown below.
%% code for different topology
ckt = circuit('h1');
for i = 1:total_elements
add(ckt,[nport_node1(i) nport_node2(i)],nport_obj{i});
ckt1 = circuit('h2');
for i = 1:total_elements
add(ckt1,[nport_node2(i) nport_node1(i)],nport_obj{i});
%The error that I get
Error using rf.internal.circuit.Circuit/add
Cannot add nport 'Sparams' to circuit 'h2': nport 'Sparams' already belongs to a circuit.
Would you please let me know how can I create different topology using same circuit objects?

Answers (0)




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by