Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please read the instructions carefully, and show your matlab code not using build in functions, just using for, while, if, else, min, max, size. I

Please read the instructions carefully, and show your matlab code not using build in functions, just using for, while, if, else, min, max, size. I will leave good feedback
image text in transcribed
If you have an invertible matrix A, you can calculate the inverse of matrix A by first augmenting matrix A with an identity matrix of same size in the form of [A I], then convert the augmented matrix in the form of [I B] using row operations, where, A" B To implement this technique, write a code that takes an invertible matrix as input and provides the matrix inverse as output. For this code, you are not allowed to use the built-in 'inv function to calculate the matrix inverse directly. Make sure your code conducts the following steps: 1. Check if the input matrix is square or not. If the matrix is not square, prompt the user to provide a square matrix as input. 2. Check the invertibility of the matrix. If the matrix is not invertible, display a message to the user that the matrix is not invertible and prompt the user to provide an invertible matrix (You may use the 'det function to perform this task). 3. Augment the input matrix with an identity matrix of same size. 4. Perform row operations in such a manner that segment consisting matrix A reduces to Identity matrix, the same operations should convert the segment consisting identity matrix into the inverse matrix of A. 5. Separate the inverse matrix from the augmented matrix and show it as output. You may only use "for", "while", "if", "elseif",'min', "max" and "size" commands in addition to math. You may not use any other command, especially any in-built command which can be used to calculate directly the inverse of a matrix. You will have one input in the function line, the matrix for which you want to calculate the inverse for. Name the function lastname firstinitial ME3430_ Activity11.m. Your first line should read something like: function [inverse, matrix) # lastname-firstinitial-ME3430-Activity11(matrix)

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions

Question

Does it exceed two pages in length?

Answered: 1 week ago

Question

Does it avoid typos and grammatical errors?

Answered: 1 week ago