Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4 use matlab Write a MATLAB function that takes an array and sorts it with respect to descending ordering (from largest to smallest) using

image text in transcribed Question 4 use matlab
Write a MATLAB function that takes an array and sorts it with respect to descending ordering (from largest to smallest) using INSERTION SORT Consider the matrix A and the vector b given below. A = [2 4 -2 4 1 5 5 11 -1 -3 -2 -4 2 6 6 8], b = [5 9 4 2] a) Apply forward elimination with partial pivoting to the pair [A|b] b) Apply backward substitution to the result you found in part b) to find the solution of Ax = b c) Compute determinant of A using forward elimination with partial pivoting d) Find inverse of A by first applying forward elimination with partial pivoting then applying backward elimination Do the following: a) Write a MATLAB function that takes a matrix A, vector b and applies forward elimination with partial pivoting to the pair [A|b]. If the matrix is singular, it should report this with an error message. b) Write a MATLAB function that performs back substitution c) Write a MALTAB function that find solution of Ax = b by calling the functions you wrote in parts a) and b). d) Use function to solve the problem given in question 1. Did you get the same answer? Also try to use the function to solve the equations defined by following pair. A = [6 4 -2 2 3 5 5 10 -3 -3 -2 -5 6 6 6 12], b = [5 0 4 9] Write a MATLAB function that computes determinant of square matrix applying forward elimination with partial pivoting. If the matrix is singular, it should return zero since determinant of a singular matrix is zero. Use your function to find the determinants of the matrices given in question 1 and 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions