Matlab で eigs() を実行する
$ matlab
< M A T L A B (R) >
Copyright 1984-2010 The MathWorks, Inc.
Version 7.11.0.584 (R2010b) 64-bit (glnxa64)
August 16, 2010
To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.
>> A = [1 2; 3 4]
A =
1 2
3 4
>> [t,v]=eigs(A,1)
t =
-0.4160
-0.9094
v =
5.3723
>>
イラスト ML 13章の最初のサンプルを入力して動作確認.
>> size(x)
ans =
100 2
Octave で 2x2 行列
$ octave
GNU Octave, version 3.2.4
Copyright (C) 2009 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'.
Octave was configured for "x86_64-pc-linux-gnu".
Additional information about Octave is available at http://www.octave.org.
Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html
Report bugs to <[email protected]> (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).
For information about changes from previous versions, type `news'.
octave:1> A = [1 2; 3 4]
A =
1 2
3 4
octave:2> d = eigs(A,1)
error: eigs: n must be at least 3