發表回覆

主題 通關密語 訪客發文, 請參考 這裡 輸入通關密語.

顯示表情符號

站內上傳圖檔     Upload.cc免費圖片上傳

數學塗鴉工具     常用數學符號表    

用Latex打數學方程式

 


 

+ / -檢視主題

發表 grove888 於 星期一 十二月 20, 2010 12:32 pm

多謝指教,我再試看看。

發表 lskuo 於 星期六 十二月 18, 2010 8:57 pm

如果要求解 Ax=b

Matlab 有建議要用

x = A\b;

這樣會比用inv(A)找反矩陣的方法快. 矩陣小的時候看不出來, 但你試試
N=2000;
A=rand(N,N);
b=rand(N,1);

x = A\b;

x = inv(A)*b;

就可以知道 "\"的威力.

發表 grove888 於 星期五 十二月 17, 2010 3:25 pm

clc
clear all
tic
x=floor(10*rand(6))
b=floor(20*rand(6,1))-10
a=inv(x)*b;
a1=a(1)
a2=a(2)
a3=a(3)
a4=a(4)
a5=a(5)
a6=a(6)
toc

[大學]Matlab算線性代數(急

發表 god9595995 於 星期五 十月 01, 2010 6:17 pm

產生矩陣
A=floor(10*rand(6))
產生向量
b=floor(20*rand(6,1))-10

Ax=b 有唯一解
用\找結果
用Matlab算出列簡梯形形式 (reduced row-echelon form)
U of [A b]
How does the last column of U compare with the solotion x?
為啥他們會一樣?

To compare the two ,compute the difference U (:,7) -x or examine both using format long.
--------------------------------------------------------------
幫幫我吧 matlab有些語法不太懂 我怕誤解題目的意思 所以把原文打出來了:D