Question

1. Write a MATLAB function that takes a matrix, a row number and a scalar as
arguments and multiplies each element of the row of the matrix by the scalar returning the
updated matrix.
2. Write a MATLAB function that takes a matrix, two row numbers and a scalar as
arguments and returns a matrix with a linear combination of the rows. For example, if the rows
passed to the function were i and j and the scalar was m, each element of row j would become
? ?? + ? × ? ?? , where k represents columns 1 through the number of columns in the matrix.
3. Using the functions written for problems 1 and 2 above, write a function that solves a
system of linear equations or calculates the inverse of a matrix by Gauss-Jordan elimination.
Your function should accept a matrix as an argument and return a matrix of the same dimensionI.( 10 pts) Write a MATLAB function that takes a matrix, a row number and a scalar as arguments and multiplies each element of the row of the matrix by the scalar returning the updated matrix. 2. (10 pts) Write a MATLAB function that takes a matrix, two row numbers and a scalar as arguments and returns a matrix with a linear combination of the rows. For example, if the rows passed to the function were i and j and the scalar was m, each element of row j would become a + m × aik, where k represents columns l through the number of columns in the matrix. 3. (30 pts) Using the functions written for problems 1 and 2 above, write a function that solves a system of linear equations or calculates the inverse of a matrix by Gauss-Jordan elimination. Your function should accept a matrix as an argument and return a matrix of the same dimension. As example of what is expected from this function consider the following linear system: 3x + 2y + z 11 2x+3y + z = 13 x+y+4z = 12 In this case you should pass into your function the following augmented matrix: 2 1 11 2 3 1 13 After performing Gauss-Jordan elimination, your function should return the folowing reduced system: 0 1 0 3 from which we can readily determine that x = 1, y = 3, z = 2. Furthermore, if you pass to your function a square matrix on the left augmented by the identity matrix on the right, such as your function should return the identity matrix on the left and the inverse of the original square matrix on the right.

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
1. Write a MATLAB function that takes a matrix, a row number and a scalar as...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT