Octave 科學計算 -- 矩陣

# 訊息

## English

``````octave-3.2.4.exe:1> a=[1 2; 3 4]
a =

1   2
3   4

octave-3.2.4.exe:2> b = [2 3; 4 5]
b =

2   3
4   5

octave-3.2.4.exe:3> c=a+b
c =

3   5
7   9

octave-3.2.4.exe:4> (8+3)*5
ans =  55
octave-3.2.4.exe:5> 10*sin(pi/3)*sin(pi/3)
ans =  7.5000
octave-3.2.4.exe:6> b=rand(3,2);
octave-3.2.4.exe:7> b
b =

0.805572   0.757786
0.932863   0.614612
0.074403   0.916952

octave-3.2.4.exe:8> a=[1,1,2; 3,5,8; 13, 21, 34]
a =

1    1    2
3    5    8
13   21   34

octave-3.2.4.exe:9> 2*a
ans =

2    2    4
6   10   16
26   42   68

octave-3.2.4.exe:10> a*b
ans =

1.8872    3.2063
7.6763   12.6820
32.5923   53.9345

octave-3.2.4.exe:11> a'*a
ans =

179    289    468
289    467    756
468    756   1224

octave-3.2.4.exe:12> a\b
warning: matrix singular to machine precision, rcond = 1.47189e-018
warning: attempting to find minimum norm solution
warning: dgelsd: rank deficient 3x3 matrix, rank = 2
ans =

1.23765   1.31327
-1.05177  -1.10326
0.18588   0.21002```
```