Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

# 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

expand all

### Generate the Rosser matrix

rosser returns the Rosser matrix.

`rosser`
```ans =
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```

### Generate matrix of class ‘single'

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

```Y = rosser('single')
whos('Y')```
```Y =

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

Name      Size            Bytes  Class     Attributes

Y         8x8               256  single      ```

## Input Arguments

expand all

### classname — Input class'double' (default) | 'single'

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

expand 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