Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MATLAB HOMEWORK #2, WI-20 The deadline is 8th week, Sunday 11.59pm Student Name Academic Honor Pledge In completing this homework, I have refrained from any
MATLAB HOMEWORK #2, WI-20 The deadline is 8th week, Sunday 11.59pm Student Name Academic Honor Pledge In completing this homework, I have refrained from any form of academic dishonesty or deception such as cheating or plagiarism. This work is solely my own origin. I affirm I am the student registered for and taking this homework. Misrepresentation is considered academic misconduct and may result in failure of the course and/or further disciplinary action, including dismissal from the University Signature without signature your HW may be discarded Student instructions: Solve the problems using Matlab. Put your result in the appropriate red box. Your script can be tested and your result verified. Not working program will not be grated. To get the result use copy-paste from Matlab editor and command window. Indicate only the final numerical result for variable required in the answer box. No any intermediate steps required. Manually written results will not be accepted. Submit your solution as a pdf file in Assignment link. Two attempts of submission are available. Ignoring the above instruction might result of discarding your work. HW#2 worth 20 points of your final grade. Submission file should be named as "Your Name_HW2 WI-20.pdf" Problem 1. (6 points) Develop the Matlab script (m-file) that solve the system of linear equations Ax=b using Gauss-Jordan method. a) form your matrix A and vector b, and provide the ill-condition test of your matrix including rank, determinant, norm, and condition number of the matrix A. If any of parameters are confused, then generate another matrix A. Put your ill-condition test result here. Use copy paste from the command window. Do not copy as a picture. Avoid semicolon, when you need to display the result in the Command Window. clc; format short A = randi (1-10 10),4,4) b=randi (1-10 10), 4, 1) & continue your script Put your result here. Use copy-paste from the command window. b= Rank = Det = Norm CondNumber = b) Develop your Matlab script to solve the system of linear equations Ax=b using Gauss- Jordan method here. Use copy-paste from the Matlab editor. Avoid semicolon, when you need to display the result in the Command Window. Check your result substituting x in equation Ax=b. Put your row echelon form of the augmented matrix U here (upper triangular). Use copy-paste from the command window. U= Put your solution, vector x, here. Use copy-paste from the command window. x= Problem 2 (4 points). Develop the Matlab script (m-file) that Find the eigenvalues (D) and the associated eigenvectors (V) of matrix C=AAT (use the matrix A generated in problem 1) Diagonalize matrix C using the V-CV Find the condition number (cond) of matrix C using eigenvalues. Prove for the 2nd eigenvalue and appropriate eigenvector that Cv2=\v2 Put your Matlab script here. Use copy-paste from the editor. Do not copy as a picture. Avoid semicolon, when you need to display the result in the Command Window. Put your result here. Use copy paste from the command window (extend the box if needs) V cond = D Cv2 = v CV Xv2 = Problem 3 (5 points). Given the inconsistent system of linear equations Ax = b, where matrix A and b formed using the data below x = (1 2 3 4 5 6 7] Y = (1.5 0.6 2 2 4.1 1.9 4.3] Form the matrix A and vector b Find the least square solution of this system given by i = (ATA)- ATD. Find the error vector (E), Find the magnitude of the error vector ||E||- Put your Matlab script here. Use copy-paste from the editor. Do not copy as a picture. Avoid semicolon, when you need to display the result in the Command Window. Put your result here. Use copy-paste from the command window E- 2 11 E- b= 5 Problem 4 (5 points). Generate the set of vectors ui, u2 and uz using the script clc; clear all; Q=randi ((-5 5],4,5); [P,D] - eig(0*0'); ulrandi ((1 9])*P(:,1) u2=randi ([1 9])*P(:,2) u3=randi ([1 9])*P(:,3) and the vector y generated by the script y=randi ((-10 10],4,1). Using developed yourself Matlab script 1. show that vectors ui, u2 and uz mutually orthogonal 2. find the orthogonal projection () of y into Span{ui, u2, uz ). 3. find the coordinates of the orthogonal axes z. Write your Matlab script here. ul = u2 u3 y Proving of orthogonality of us, uz and us = 2 MATLAB HOMEWORK #2, WI-20 The deadline is 8th week, Sunday 11.59pm Student Name Academic Honor Pledge In completing this homework, I have refrained from any form of academic dishonesty or deception such as cheating or plagiarism. This work is solely my own origin. I affirm I am the student registered for and taking this homework. Misrepresentation is considered academic misconduct and may result in failure of the course and/or further disciplinary action, including dismissal from the University Signature without signature your HW may be discarded Student instructions: Solve the problems using Matlab. Put your result in the appropriate red box. Your script can be tested and your result verified. Not working program will not be grated. To get the result use copy-paste from Matlab editor and command window. Indicate only the final numerical result for variable required in the answer box. No any intermediate steps required. Manually written results will not be accepted. Submit your solution as a pdf file in Assignment link. Two attempts of submission are available. Ignoring the above instruction might result of discarding your work. HW#2 worth 20 points of your final grade. Submission file should be named as "Your Name_HW2 WI-20.pdf" Problem 1. (6 points) Develop the Matlab script (m-file) that solve the system of linear equations Ax=b using Gauss-Jordan method. a) form your matrix A and vector b, and provide the ill-condition test of your matrix including rank, determinant, norm, and condition number of the matrix A. If any of parameters are confused, then generate another matrix A. Put your ill-condition test result here. Use copy paste from the command window. Do not copy as a picture. Avoid semicolon, when you need to display the result in the Command Window. clc; format short A = randi (1-10 10),4,4) b=randi (1-10 10), 4, 1) & continue your script Put your result here. Use copy-paste from the command window. b= Rank = Det = Norm CondNumber = b) Develop your Matlab script to solve the system of linear equations Ax=b using Gauss- Jordan method here. Use copy-paste from the Matlab editor. Avoid semicolon, when you need to display the result in the Command Window. Check your result substituting x in equation Ax=b. Put your row echelon form of the augmented matrix U here (upper triangular). Use copy-paste from the command window. U= Put your solution, vector x, here. Use copy-paste from the command window. x= Problem 2 (4 points). Develop the Matlab script (m-file) that Find the eigenvalues (D) and the associated eigenvectors (V) of matrix C=AAT (use the matrix A generated in problem 1) Diagonalize matrix C using the V-CV Find the condition number (cond) of matrix C using eigenvalues. Prove for the 2nd eigenvalue and appropriate eigenvector that Cv2=\v2 Put your Matlab script here. Use copy-paste from the editor. Do not copy as a picture. Avoid semicolon, when you need to display the result in the Command Window. Put your result here. Use copy paste from the command window (extend the box if needs) V cond = D Cv2 = v CV Xv2 = Problem 3 (5 points). Given the inconsistent system of linear equations Ax = b, where matrix A and b formed using the data below x = (1 2 3 4 5 6 7] Y = (1.5 0.6 2 2 4.1 1.9 4.3] Form the matrix A and vector b Find the least square solution of this system given by i = (ATA)- ATD. Find the error vector (E), Find the magnitude of the error vector ||E||- Put your Matlab script here. Use copy-paste from the editor. Do not copy as a picture. Avoid semicolon, when you need to display the result in the Command Window. Put your result here. Use copy-paste from the command window E- 2 11 E- b= 5 Problem 4 (5 points). Generate the set of vectors ui, u2 and uz using the script clc; clear all; Q=randi ((-5 5],4,5); [P,D] - eig(0*0'); ulrandi ((1 9])*P(:,1) u2=randi ([1 9])*P(:,2) u3=randi ([1 9])*P(:,3) and the vector y generated by the script y=randi ((-10 10],4,1). Using developed yourself Matlab script 1. show that vectors ui, u2 and uz mutually orthogonal 2. find the orthogonal projection () of y into Span{ui, u2, uz ). 3. find the coordinates of the orthogonal axes z. Write your Matlab script here. ul = u2 u3 y Proving of orthogonality of us, uz and us = 2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started