Question

**PLEASE USE MATLAB2. For each system of linear algebraic equations, determine if the system is underdetermined, has an exact solution, or is ov

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Plzzzzzzzzzzzzzzzzzzz Upvote...
Comment for any queries.....thanks

Here is the solution using MATLAB.

2 a) Smain.m A-[1-1 1-1:32-41,-1 5 2 3;4 1-30] %Exact solutio n least square solution least-square-a-pinv (A) *B disp (The a

Code to copy:

a)

%main.m

A = [1 -1 1 -1;3 2 -4 1;-1 5 2 3;4 1 -3 0]

B = [3; 2; 4; 5]

%Exact solution

X = A\B

%least square solution

least_Square=A*pinv(A)*B

disp('The augmented matrix is:')

rref([A B])

b) 8main.m A1-1 1 13 2 -4 1;-1 5 2 3;41 -3 2] %Exact solutio n least square solution least_square-A*pinv (A) *B disp (The au

1.4186 2.4651 1.0465 -3.0000 least_Square - 3.00000 2.00000 4.00000 -1.00000 The augmented matrix is: ans 1.00000 0.00000 .00

Code to copy:

b)

%main.m

A = [1 -1 1 -1;3 2 -4 1;-1 5 2 3;4 1 -3 2]

B = [3; 2; 4; -1]

%Exact solution

X = A\B

%least square solution

least_Square=A*pinv(A)*B

disp('The augmented matrix is:')

rref([A B])

c) Smain.m ΑΞ[1-1 1-1:32-41,-1 5 2 3;4 1-30] %Exact s luti on least square solution least_square-A*pinv (A) *B disp (The aug

2.57644 0.87994 1.61745 -0.35272 least_Square - 3.6667 2.6667 4.0000 6.3333 The augmented matrix is: ans 1.00000 0.00000 .000

Code to copy:

c)

%main.m

A = [1 -1 1 -1;3 2 -4 1;-1 5 2 3;4 1 -3 0]

B = [3; 2; 4; 7]

%Exact solution

X = A\B

%least square solution

least_Square=A*pinv(A)*B

disp('The augmented matrix is:')

rref([A B])

Add a comment
Know the answer?
Add Answer to:
**PLEASE USE MATLAB 2. For each system of linear algebraic equations, determine if the system is underdetermined, has an exact solution, or is overdetermined. If the system is underdetermined, find th...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
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