The document provides two Matlab assignment questions. The first asks to solve a system of 3 equations using determinants, Cramer's rule, and Gauss elimination with partial pivoting, then check the solution. The second asks to convert constraints about a 4-digit number into matrix form, write code to solve it using Gauss elimination with partial pivoting, and verify the solution.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
320 views
Matlab Assignment Questions
The document provides two Matlab assignment questions. The first asks to solve a system of 3 equations using determinants, Cramer's rule, and Gauss elimination with partial pivoting, then check the solution. The second asks to convert constraints about a 4-digit number into matrix form, write code to solve it using Gauss elimination with partial pivoting, and verify the solution.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
Matlab Assignment Questions
1. Given the system of equations
3x2 + 7x3 = 2 ..(i) x1 + 2x2 x3 = 3 ...(ii) 5x1 2x2 = 2..(iii) (a) Compute the determinant. (b) Use Cramers rule to solve for the xs (c) Use Gauss elimination with partial pivoting to solve for the xs. (d) Substitute your results back into the original equations to check your solution.
2. Generate a four digit number that satisfies the following properties
The sum of all the digits is 15
The third digit subtracted from the first digit is 4 The last digit is half the second digit Sum of first and third digit gives the second digit
a) Convert the above information into Ax= B format.
b) Write a matlab code to solve the above problem using Gauss elimination method with partial pivoting c) Verify your result by solving using backward slash operator(\)