Main Content

rosser

Classic symmetric eigenvalue test problem

Description

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.

example

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 = 8×8 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

Extended Capabilities

expand all

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

Version History

Introduced before R2006a

See Also