How do I make ports in RF toolbox with complex port impedances?
8 views (last 30 days)
Show older comments
I am trying to make a circuit in RF toolbox with one port being a complex non-50 ohm port impedance. Say 10+5j.
As I understand it setports is defined like this however this is assuming all 50 ohm ports. How do I change the reference impedance of the port from node 1/2. and keep the 3/2 node still as 50 ohm.
ckt = circuit("cir")
setports(ckt, [1 2], [3 2])
0 Comments
Answers (1)
Jack
on 7 Mar 2025
Edited: Rik
on 12 Mar 2025
Hey Tony,
Here’s how you can set one port to 10 + 5j ohms while keeping another at 50 ohms:
ckt = circuit("cir");
addport(ckt, [1 2], 'Z', 10 + 5j);
addport(ckt, [3 2], 'Z', 50);
This explicitly sets the port impedance when defining the ports, so you’re not stuck with 50 ohms everywhere.
Follow me so you can message me anytime with future MATLAB questions.
5 Comments
Rik
on 12 Mar 2025
@Jack Using tools (e.g. an LLM) to create answers/comments is allowed, however, it is up to the user to verify the correctness of such automatic content, and to apply edits as needed.
An easy way to verify your code works, is to format your code as code and run it. As you can see, your code tends to result in an error.
There is no shame in not knowing the answer to a question. There is shame in blindly posting something an LLM generated and presenting it as an answer without even bothering to test the code runs without error.
See Also
Categories
Find more on Circuits and Systems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!