Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

circuit

Capacitor object

Description

Use circuit class to build a circuit object which can contain elements like resistor, capacitor, and inductor.

Creation

Syntax

cktobj = circuit
cktobj = circuit(cktname)
cktobj = circuit([elem1,elem2,...])
cktobj = circuit([elem1,elem2,...],cktname)
cktobj = circuit(rfb)
cktobj = circuit(rfb,cktname)

Description

example

cktobj = circuit creates a circuit object cktobj with a default name.

cktobj = circuit(cktname) creates a circuit object cktobj with name of cktname.

example

cktobj = circuit([elem1,elem2,...]) creates a circuit object cktobj by cascading the specified 2-port elements.

cktobj = circuit([elem1,elem2,...],cktname) creates a cascaded circuit object cktobj with the name, cktname.

cktobj = circuit(rfb) creates a circuit object cktobj by cascading the elements in the RF object, rfb.

cktobj = circuit(rfb,cktname) creates a circuit object cktobj by cascading the elements in the RF object, rfb, using name, cktname.

Input Arguments

expand all

2-port RF elements, specified as a character vectors. The possible elements are modulator, nport, and amplifier

RF budget object, specified as an object handle.

Properties

expand all

Name of circuit, specified as a character vector. Default name is unnamed. Two circuit elements attached together or belonging to the same circuit cannot have the same name

Name of elements in the circuit, specified as a vector of cell vector. The possible elements here are resistor, capacitor, inductor, and circuit.

Names of terminals in the circuit, specified as a cell vector. Use setterminals or setports function to define the terminals. The terminals of the circuit are only displayed once it is defined.

Names of ports in a circuit specified as a character vector. Use setports function to define the ports. The ports of the circuit are only displayed once it is defined.

List of nodes defined in the circuit, specified as a vector of integers. These nodes are created when a new element is attached to the circuit.

Full path of parent circuit, specified as a character vector. This path appears only once the child circuit is added to the parent circuit.

Nodes of parent circuit, specified as a vector of integers. This vector of integers is the same length as the Terminals property. This property appears only after the child circuit is added to the parent circuit.

Circuit nodes in the parent nodes connect to capacitor terminals, specified as a vector of integers. This property appears only after the capacitor is added to a circuit.

Example: [1 2]

Example: lobj.ParentNodes = [1 2]

Note

"ParentNodes" are only displayed after the capacitor has been added

into a circuit.

Examples

expand all

Create a circuit called new_circuit. Add a resistor and capacitor to the ciruit. Set the terminals and display the results.

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)
  circuit: Circuit element

    ElementNames: {'C'  'R'}
           Nodes: [1 2 3]
            Name: 'new_circuit1'
       Terminals: {'t1'  't2'}

Create a circuit called new_circuit. Add a capacitor and inductor parallel to the circuit.

hckt = circuit('new_circuit');
hC = add(hckt,[1 2],capacitor(1e-12));
hL = add(hckt,[1 2],inductor(1e-9));
disp(hckt)
  circuit: Circuit element

    ElementNames: {'C'  'L'}
           Nodes: [1 2]
            Name: 'new_circuit'

Introduced in R2013b

Was this topic helpful?