abcdchk function

State-space matrices check.

State-space matrices check.

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

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

Returns

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

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.

Examples

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)
  • Maintainer: Ben C. Ubah
  • License: GPL-2
  • Last published: 2017-12-12

Useful links