Main Content

Constants and Test Matrices

Pi, Not-a-Number, infinity; Hadamard, companion, Pascal, and other specialized matrices

MATLAB® provides several constants, test matrices, and other named matrices as well as functions to examine array elements. You can use these constants, matrices, and functions to test your code and check if your computations return the intended results.

Funktionen

alle erweitern

epsFloating-point relative accuracy
flintmaxLargest consecutive integer in floating-point format
iImaginary unit
jImaginary unit
InfCreate array of all Inf values
piVerhältnis des Kreisumfangs zum Kreisdurchmesser
NaNCreate array of all NaN values
companCompanion matrix
galleryTest matrices
hadamardHadamard matrix
hankelHankel matrix
hilbHilbert matrix
invhilbInverse of Hilbert matrix
magicMagic square
pascalPascal matrix
rosserClassic symmetric eigenvalue test problem
toeplitzToeplitz matrix
vanderVandermonde matrix
wilkinsonWilkinson's eigenvalue test matrix
allfiniteDetermine if all array elements are finite (Seit R2022a)
anynanDetermine if any array element is NaN (Seit R2022a)
isfiniteDetermine which array elements are finite
isinfDetermine which array elements are infinite
isnanBestimmen der Array-Elemente, die NaN sind

Themen