Mu Analysis and Synthesis Toolbox | ![]() ![]() |
Evaluate general functions of CONSTANT, SYSTEM, and VARYING matrices
Syntax
Description
The veval
function evaluates the command oper
on the input matrices. veval
works like feval but on collections of VARYING, CONSTANT, and SYSTEM matrices. 'oper'
is a character string with the name of a MATLAB function (user written, or MATLAB supplied). The function is applied to each input argument at the independent variable's values. Any CONSTANT or SYSTEM matrix is held at its value while the sweep through the independent variable is performed. veval
is currently limited to 10 output arguments, and 13 input arguments. These are both easily changeable. veval
can be used to generate and manipulate VARYING, SYSTEM matrices or VARYING matrices whose elements are themselves VARYING matrices. Arbitrary nesting of VARYING matrices is possible.
The veval
function is very useful for rapid prototyping of customized commands employing VARYING matrices.
Examples
To show the flexibility of veval
, two random SYSTEM matrices are constructed. The poles of each SYSTEM are determined with the spoles command.
sys1 = sysrand(2,1,1); sys2 = sysrand(2,1,1); spoles(sysl) ans = 0.1577 0.7405 spoles(sys2) ans = 0.6273 -0.5661
These two SYSTEM matrices are combined to form a VARYING matrix, vsys
. The veval
command is used to find poles of the VARYING matrix, which consists of the two SYSTEM matrices. A SYSTEM matrix is associated with each independent variable.
vsys =vpck
([sysl;sys2],[1 2]); vsyspoles =veval
('spoles',vsys); see(vsyspoles) 2 rows1 column iv = 1 0.1577 0.7405 iv = 2 0.6273 -0.5661
See Also
eval
, feval
, vebe
![]() | veig | vfft, vifft, vspect | ![]() |