Categories &

Functions List

Function Reference: sumblk

Function File: S = sumblk (formula)
Function File: S = sumblk (formula, n)

Create summing junction S from string formula for name-based interconnections.

Inputs

formula

String containing the formula of the summing junction, e.g. e = r - y + d

n

Signal size. Default value is 1.

Outputs

S

State-space model of the summing junction.

Example

 
 
 octave:1> S = sumblk ('e = r - y + d')
 
 S.d =
        r   y   d
    e   1  -1   1
 
 Static gain.
 octave:2> S = sumblk ('e = r - y + d', 2)
 
 S.d =
        r1  r2  y1  y2  d1  d2
    e1   1   0  -1   0   1   0
    e2   0   1   0  -1   0   1
 
 Static gain.
 
 

See also: connect

Source Code: sumblk