p3_23.dir

来自「Programs for the book Advanced Engineeri」· DIR 代码 · 共 42 行

DIR
42
字号
%  Diary file (edited) of interactive solution of Problem 3_23
%
>> % Problem 3_23
>> x1=[3 0 2 2];
>> x2=[-6 42 24 54];
>> x3=[21 -21 0 -15];
>> Arank=[x1;x2;x3]
Arank =
     3     0     2     2
    -6    42    24    54
    21   -21     0   -15
> rank(Arank)
ans =
     2
> rref(Arank)
ans =
    1.0000         0    0.6667    0.6667
         0    1.0000    0.6667    1.3810
         0         0         0         0
>>% Thus third row is dependent
>>%   Solve system of equations to find relationship   
>>%
>>% Solve  a*X1 + b*X2 = X3
>>Acoef=[x1' x2']
Acoef =
     3    -6
     0    42
     2    24
     2    54
>>x3
x3 =
    21   -21     0   -15
>>Coef=Acoef\x3'
Coef =
    6.0000
   -0.5000
%---------------------------
% Edit this this diary file to create an M-file to solve 
%   the problem
%
%

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?