0

I have a symmetric matrix found from the following commands:

a=rand(n);
A=triu(a)+triu(a,1)'

I was wondering how I reduce this symmetric matrix into a tridiagonal matrix?

Any help is appreciated. Thank you very much.

Robert Seifert
  • 25,078
  • 11
  • 68
  • 113

1 Answers1

1

What you want is to find the upper Hessenberg form of your matrix. For a symmetric matrix, this is tridiagonal.

Use the command hess to do this:

B=hess(A); 
riklund
  • 1,031
  • 2
  • 8
  • 16