Question: Please show in matlab Create a symmetric matrix: Create an upper triangular matrix with the following command: A = diag (1: 6) + diag (7:

Please show in matlab  Please show in matlab Create a symmetric matrix: Create an upper

Create a symmetric matrix: Create an upper triangular matrix with the following command: A = diag (1: 6) + diag (7: 11, 1) + diag (12: 15, 2) Make sure you understand how this command works (see the on-line help on diag). Now use the upper off-diagonal terms of A to make A a symmetric matrix with the following command: A = A + triu (A, 1) This command takes the upper triangular part of A above the main diagonal, flips it (transpose), and adds to the original matrix A, thus creating a symmetric matrix A. Sec the on-line help on triu

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!