Main Content

rosser

Classic symmetric eigenvalue test problem

Description

example

A = rosser returns the Rosser matrix in double precision.

example

A = rosser(classname) returns the Rosser matrix with a class specified by classname. Specify classname as 'single' to return the Rosser matrix in single precision.

Examples

collapse all

rosser returns the Rosser matrix.

rosser
ans = 8×8

   611   196  -192   407    -8   -52   -49    29
   196   899   113  -192   -71   -43    -8   -44
  -192   113   899   196    61    49     8    52
   407  -192   196   611     8    44    59   -23
    -8   -71    61     8   411  -599   208   208
   -52   -43    49    44  -599   411   208   208
   -49    -8     8    59   208   208    99  -911
    29   -44    52   -23   208   208  -911    99

Specify classname as single to return a Rosser matrix of that class.

Y = rosser('single')
Y = 8x8 single matrix

   611   196  -192   407    -8   -52   -49    29
   196   899   113  -192   -71   -43    -8   -44
  -192   113   899   196    61    49     8    52
   407  -192   196   611     8    44    59   -23
    -8   -71    61     8   411  -599   208   208
   -52   -43    49    44  -599   411   208   208
   -49    -8     8    59   208   208    99  -911
    29   -44    52   -23   208   208  -911    99

whos('Y')
  Name      Size            Bytes  Class     Attributes

  Y         8x8               256  single              

Input Arguments

collapse all

Input class, specified as 'double' (default) or 'single'. rosser(C) produces a matrix of the specified class.

More About

collapse all

Rosser Matrix

The Rosser matrix is a well known matrix used, for example, to evaluate eigenvalue algorithms. The matrix is 8-by-8 with integer elements. It has:

  • A double eigenvalue

  • Three nearly equal eigenvalues

  • Dominant eigenvalues of the opposite sign

  • A zero eigenvalue

  • A small, nonzero eigenvalue

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced before R2006a

See Also