Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Matlab help (layout already given) DISPLAY IN MATLAB THE 2 M-FILE FUNCTIONS GIVEN In this exercise, you use RREF and Rouch-Capelli Theorem to determine if

Matlab help (layout already given)

image text in transcribed

DISPLAY IN MATLAB

image text in transcribed

THE 2 M-FILE FUNCTIONS GIVEN

image text in transcribed

image text in transcribed

In this exercise, you use RREF and Rouch-Capelli Theorem to determine if Ax=b is consistent. You may need the following commands for this exercise. - The command rref (A) returns the reduced row echelon form of a matrix A - The command [B,pivot]= returns the matrix B=rref(A) and pivot indicates pivot columns - The command rank (A) returns the rank of a matrix A You also need two m-file functions rank_comp (given) and LS_solution (template only). In these functions, you need to know - if-else statement: If expression is true, it executes the statements1 block. Otherwise, it executes the statements2 block. if expression statements1 else statements2 end - if-elseif statement: If expression1 is true, it executes the statements1 block. If not, check expression2. If expression2 is true, it executes the statements 2 block. If not, executes the statements 3 block. if expression 1 statements1 elseif expression 2 statements2 else statements 3 end Exercise 2 - solving Ax=b \#2 (a) [[B,pivot] The matrix B is ... and pivot ... The system Ax=b is consisten or inconsistent because ... \#2 (b) rank_comp() By Rouch-Capelli Theorem, the system Ax=b is consisten or inconsistent. Compare your result with part (a). #2 (c) \[ \begin{array}{l} {[\mathrm{m}, \mathrm{n}]=\operatorname{size}(\mathrm{A})} \\ \text { LS_solution() } \end{array} \] function rank_comp(A, Ab) % Compare the rank of A and its augmented matrix [A b] % A = coefficient matrix of linear equations % Ab = corresponding augmented matrix [A b] if rank(A)==rank(Ab) disp(rank([A]) equals to rank([A b ])) else disp('rank( [A]) does not equal to rank([A b ])) end end function LS_solution( n,A,Ab) % Purpose of this function %n= %A= %Ab= % modify the function rank_comp.m if elseif else end end

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: 3

blur-text-image

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

Intelligent Information And Database Systems Second International Conference Acids Hue City Vietnam March 2010 Proceedings Part 1 Lnai 5990

Authors: Manh Thanh Le ,Jerzy Swiatek ,Ngoc Thanh Nguyen

2010th Edition

3642121446, 978-3642121449

More Books

Students also viewed these Databases questions

Question

What is motivation and hierarchy of needs theory?

Answered: 1 week ago