基础
矩阵与基本运算
>> exp(2)
ans = 7.3891
>> exp(pi)
ans = 23.141
>> exp(i*pi)
ans = -1.0000e+00 + 1.2246e-16i
>> a=[1,2,3]
a =
1 2 3
>> b=[[1,2,3],[4,5,6]]
b =
1 2 3 4 5 6
>> b=[[1,2,3];[4,5,6]]
b =
1 2 3
4 5 6
>> b
b =
1 2 3
4 5 6
>> b*3
ans =
3 6 9
12 15 18
ꛣ ^
>> b'
ans =
1 4
2 5
3 6
>> b'*c
ans =
2.9336 1.6141 3.5353
4.0013 2.4568 4.5739
5.0690 3.2994 5.6125
随机矩阵
0-1之间
>> c=rand(2,3)
c =
0.907821 0.321604 0.983000
0.057399 0.359002 0.376203
>> c=rand(2,3)
c =
0.4457 0.5855 0.2063
0.6220 0.2572 0.8323
标签:实战,rand,octave,笔录,exp,ans,pi
From: https://www.cnblogs.com/waterruby/p/18100288