MATLAB exercises Create a script for the following exercises
MATLAB exercises: Create a script for the following exercises:
Let S be the standard basis for R 5 . Let basis W and vector u: W ={ [ 1; 0; 0; 0; 0 ] , [1; 1; 0; 0; 0] , [ 1; 1; 1; 0; 0 ] , [ 1; 1; 1; 1; 0] ,[ 1; 1; 1; 1; 1 ] } , u =[5 ;2; 7; 6; 3 ]. Find the coefficients to express u as a linear combination of the vectors in S and W. Comment on the results.
Solution
S = [1 0 0 0 0;
     0 1 0 0 0;
     0 0 1 0 0;
     0 0 0 1 0;
     0 0 0 0 1];
 W = [1 1 1 1 1;
     0 1 1 1 1;
     0 0 1 1 1;
     0 0 0 1 1;
     0 0 0 0 1];
 SW = [S,W];
u = [5;
     -2;
     7;
     6;
     3];
x = SW\\u;
 disp(x);
![MATLAB exercises: Create a script for the following exercises: Let S be the standard basis for R 5 . Let basis W and vector u: W ={ [ 1; 0; 0; 0; 0 ] , [1; 1; 0 MATLAB exercises: Create a script for the following exercises: Let S be the standard basis for R 5 . Let basis W and vector u: W ={ [ 1; 0; 0; 0; 0 ] , [1; 1; 0](/WebImages/30/matlab-exercises-create-a-script-for-the-following-exercises-1083533-1761569380-0.webp)
