Please fix the code. I attached the problems % Given the following vectors: (Encode as column vectors) v1 = [1,4,5] v2 = [3,1,6] v3 = [-2,1,-2] %Perform the indicated operations to find R1 and R2. R1...



Please fix the code. I attached the problems


% Given the following vectors: (Encode as column vectors)

v1 = [1,4,5]

v2 = [3,1,6]

v3 = [-2,1,-2]

%Perform the indicated operations to find R1 and R2.

R1 = 3*v1+2*v2-5*v3

R2 = 2*v1+4*v2-6*v3

%Find the constants c1,c2 and c3 such that v= c1v1+c2v2+c3v3 given that v=<4 8="" 1="">

%Augment the vectors v1,v2 and v3 to form matrix A

A = [v1;v2;v3]

v = [4;8;1]

%Augment A and v and express as reduced row echelon form.

Av =[A,v]

rrefAv = rref(Av)

%Extract the column matrix and the remaining matrix

Root = rrefAv(:,end)

AL = rrefAv(:,1:end-1)

if AL == eye(size(AL))

c1 = Root(1)

c2 = Root(2)

c3 = Root(3)

else

display("No Roots Found")

c1 = NaN;

c2 = NaN;

c3 = NaN;

end


O Encoded vectors correctly?<br>Variable v1 must be of size [3 1]. It is currently of size [1 3]. Check where the variable is assigned a value.<br>O Encoded vectors correctly?<br>Variable v2 must be of size [3 1]. It is currently of size [1 3]. Check where the variable is assigned a value.<br>* Encoded vectors correctly?<br>Variable v3 must be of size [3 1]. It is currently of size [1 3]. Check where the variable is assigned a value.<br>O Encoded vectors correctly?<br>O Augmented vectors correctly?<br>Variable Av has an incorrect value.<br>O Augmented vectors correctly?<br>Variable A has an incorrect value<br>O Solved the constant correctly?<br>Variable c1 has an incorrect value.<br>O Solved the constant correctly?<br>Variable c2 has an incorrect value.<br>O Solved the constant correctly?<br>Variable c3 has an incorrect value.<br>O Applied reduced row echelon form?<br>

Extracted text: O Encoded vectors correctly? Variable v1 must be of size [3 1]. It is currently of size [1 3]. Check where the variable is assigned a value. O Encoded vectors correctly? Variable v2 must be of size [3 1]. It is currently of size [1 3]. Check where the variable is assigned a value. * Encoded vectors correctly? Variable v3 must be of size [3 1]. It is currently of size [1 3]. Check where the variable is assigned a value. O Encoded vectors correctly? O Augmented vectors correctly? Variable Av has an incorrect value. O Augmented vectors correctly? Variable A has an incorrect value O Solved the constant correctly? Variable c1 has an incorrect value. O Solved the constant correctly? Variable c2 has an incorrect value. O Solved the constant correctly? Variable c3 has an incorrect value. O Applied reduced row echelon form?
Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here