Solving a matrix using MatLab?

I need help solving the following matrix
>> M = [1 0 2 1 18; 0 -3 -3 0 -8; -2 -3 0 0 -41; -1 0 -1 1 16]
I was able to get it to the following
>> M = [1 0 2 1 18; 0 1 1 0 2.6667; 0 2.3333 0 -.6667 5.2222; 0 0 1 2 34]
I'm stuck. Anybody willing to help me through this. Thanks in advance
It has to be reduced into RREF. What would my next step be?

回答 (2 件)

Tobias
Tobias 2013 年 4 月 10 日

0 投票

Do you have to do it manually? If you have MATLAB at your disposal, why not just use the rref-command?
rref(M)
^ That should fix your problem
Amed
Amed 2013 年 4 月 10 日

0 投票

I have to do it manually and rref(M) at the end to show it's in RREF form

7 件のコメント

Tobias
Tobias 2013 年 4 月 10 日
編集済み: Tobias 2013 年 4 月 10 日
Are you sure you have not made a mistake somewhere? I am not getting the same value as you have in your last step and going onwards from there, probably won't do you any good.
By the way: Use comment and not answer
Amed
Amed 2013 年 4 月 10 日
Error as in what? I'm solving using matlab so i'm not too sure where I went wrong.. I'll start from the beginning and step by step what I do
Amed
Amed 2013 年 4 月 10 日
編集済み: Amed 2013 年 4 月 10 日
>> M = [1 0 2 1 18; 0 -3 -2 0 -8; -2 -3 0 0 -41; 1 0 -1 1 16];
>> M2=M;
>> M2(3,:) = M2(3,:)+(2*M2(1,:));
>> M2(4,:) = M2(4,:)-M2(1,:);
>> M3 = M2;
>> M3(3,:) = M3(3,:)+M3(2,:);
>> M3(3,:) = M3(3,:)-M3(2,:);
>> M3(3,:) = M3(3,:)-M3(2,:);
>> M3(2,:) = (-1/3)*M3(2,:)
end I end up with [1 0 2 1 18; 0 1 .6667 0 2.6667, 0 0 6 2 3, 0 0 -3 0 -2];
Amed
Amed 2013 年 4 月 10 日
I'm so lost...
Amed
Amed 2013 年 4 月 10 日
Anybody help, it's due like real soon. I'm stuck in the water on this one
Amed
Amed 2013 年 4 月 10 日
hello, anybody out there?
Amed
Amed 2013 年 4 月 10 日
yoyoyoyoyo

この質問は閉じられています。

タグ

質問済み:

2013 年 4 月 10 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by