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

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site