abcdchk: State-space matrices check.

Description Usage Arguments Details Value Examples

Description

abcdchk verifies the dimensions of A,B,C,D matrices in its arguments, to ascertain that they are correctly defined.

Usage

1
abcdchk(a, b, c, d)

Arguments

a

An n x n matrix

b

An n x m matrix

c

An p x n matrix

d

An p x m matrix

Details

This is a utility function that is always invoked by other functions to ascertain the dimensions of the arguments a,b,c,d and returns a message if there is an ill-defined entry.

Value

Returns an empty string if matrix dimensions are consistent. Otherwise it returns the associated error message

Examples

1
2
3
4
5
A <- rbind(c(0,1), c(-10000,-4))
B <- rbind(0,1)
C <- rbind(c(1,0), c(0,1))
D <- rbind(0,0)
message <-  abcdchk(A,B,C,D)

benubah/control documentation built on May 10, 2020, 1:38 a.m.