BASIS of Vectors My Solutions > A given set of vectors is said to form a basis if the set of vectors are both linearly independent and forms a spanning set for the given space. In this exercise, the learners are asked to determine whether the concatenated vectors are spanning set, linearly independent and form a basis. Required: 1. Create a function with three output [ss, li,bas] which will determine whether the vectors are spanning set, linearly independent and forms a basis for R^n. 2. The name of the function is splibas. 3. The function accepts the concatenated vectors A and the program will solve the reduced row echelon form from which the interpretation will be done whether the vectors are linearly independent, spanning set and forming a basis for R^n

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Please answer the "function" I already did the code. thank you 

this is my code : 

A = [2,1,0;-1,1,1;1,1,-1]
[ss,li,bas] = splibas(A)

 
function [ss,li,bas] = splibas(A)

 
% Initialize outputs to false
ss = false;
li = false;
bas = false;

 
% Get Dimension of vectors
dim = size(A(:,1),1);

 
% Get number of vectors
n = size(A,2);

 
% Calculate Rank of A
r= rank(A);

 
% If rank is equal to number of vector
% Vectors are linearly independent
if(r==n)
li = true;
end

 
% Calculate row echelon form of A
RE = rref(A);

 
% Find number of non-zero rows
span = 0;
for i=1:dim
if(~isequal(RE(i,:),zeros(1,n)))
span = span + 1;
end
end

 
% If number of non-zero rows equals vector dimension
% Vectors form a spanning set
if(span==dim)
ss = true;
end

 
% If vectors are both spanning set and linearly-independent
% They form Basis
if(ss==true && li==true)
bas = true;
end

 
end
BASIS of Vectors
My Solutions >
A given set of vectors is said to form a basis if the set of vectors are both linearly independent and forms a spanning set for the given space. In this exercise, the learners are
asked to determine whether the concatenated vectors are spanning set, linearly independent and form a basis.
Required:
1. Create a function with three output [ss, li,bas] which will determine whether the vectors are spanning set, linearly independent and forms a basis for R^n.
2. The name of the function is splibas.
3. The function accepts the concatenated vectors A and the program will solve the reduced row echelon form from which the interpretation will be done whether the vectors are
linearly independent, spanning set and forming a basis for R^n
Function e
A Save
C Reset
O MATLAB Documentation
1 %This program accepts the concatenated column vectors A, where the size of the Matrix will initially be checked.
It will be transformed into its
2 %reduced row echelon form from which the program shall interpret whether it forms a basis, is linearly independent or spanning set for R^n.
3
4
Transcribed Image Text:BASIS of Vectors My Solutions > A given set of vectors is said to form a basis if the set of vectors are both linearly independent and forms a spanning set for the given space. In this exercise, the learners are asked to determine whether the concatenated vectors are spanning set, linearly independent and form a basis. Required: 1. Create a function with three output [ss, li,bas] which will determine whether the vectors are spanning set, linearly independent and forms a basis for R^n. 2. The name of the function is splibas. 3. The function accepts the concatenated vectors A and the program will solve the reduced row echelon form from which the interpretation will be done whether the vectors are linearly independent, spanning set and forming a basis for R^n Function e A Save C Reset O MATLAB Documentation 1 %This program accepts the concatenated column vectors A, where the size of the Matrix will initially be checked. It will be transformed into its 2 %reduced row echelon form from which the program shall interpret whether it forms a basis, is linearly independent or spanning set for R^n. 3 4
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY