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.

Fonctions

développer tout

epsFloating-point relative accuracy
flintmaxLargest consecutive integer in floating-point format
iImaginary unit
jImaginary unit
InfCreate array of all Inf values
piRatio de la circonférence du cercle par rapport à son diamètre
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 (depuis R2022a)
anynanDetermine if any array element is NaN (depuis R2022a)
isfiniteDetermine which array elements are finite
isinfDetermine which array elements are infinite
isnanDéterminer les éléments NaN d'un tableau

Rubriques