Write a MATLAB script to generate a matrix which has the values d along the main diagonal and the values c on the diagonals above and below the main diagonal and zero elsewhere. Your script should allow the user to input any values for c and d and work for any size of matrix n. The script should give clear prompts for input and display the results with a suitable heading.  Write a MATLAB function to solve the quadratic equation

ax+ b x +c = 0

The function will use three input parameters a, b, c and output the values of the two roots. You should take account of the three cases:

(a) no real roots

(b) real and different roots

(c) equal roots Hint: Develop the function rootquad given in Section 1.19

 

find the cost of your paper

The post Write a MATLAB script to generate a matrix which has the values d along the main diagonal and the values c on the diagonals above and below the main diagonal and zero elsewhere. appeared first on Best Custom Essay Writing Services | EssayBureau.com.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *