看板 MATLAB 關於我們 聯絡資訊
我要用power method 算eigenvalue跟vector A=[2 3 2;10 3 4;3 6 1] 初始值=[0;0;1] 下面是我的function function [vec,value]=power(start,A) dd=1; x=start; b=11; while dd > 0.001 y=A*x; n=norm(y); dd = abs(n-b); x=y/n; end vec=x; value=n; 不知道哪裡有問題跑不出來 請高手幫我看一下 THX -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 111.242.19.160 ※ 編輯: handsomepow 來自: 111.242.19.160 (12/25 14:30)
Rasin:檔名與內建函式重複 換掉檔名即可 12/25 15:03
handsomepow:謝謝 可以了@@ 12/25 15:13