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.


Establish relationship between component variables and nodes


across( variable1, node1.variableA, node2.variableB )


across( variable1, node1.variableA, node2.variableB ) establishes the following relationship between the three arguments: variable1 is assigned the value (node1.variableA – node2.variableB). All arguments are variables. The first one is not associated with a node. The second and third must be associated with a node.

The following rules apply:

  • All arguments must have consistent units.

  • The second and third arguments do not need to be associated with the same domain. For example, one may be associated with a one-phase electrical domain, and the other with a 3-phase electrical.

  • Either the second or the third argument may be replaced with [] to indicate the reference node.


If a component declaration section contains two electrical nodes, p and n, and a variable v = { 0, 'V' }; specifying voltage, you can establish the following relationship in the setup section:

across( v, p.v, n.v );  

This defines voltage v as an Across variable from node p to node n.

See Also


Introduced in R2008b

Was this topic helpful?