我创建了一个3x3矩阵。索引操作最初运行良好。在Matlab/Octave中,如何对转置矩阵进行索引?
>> K=rand(3)
K =
0.8147 0.9134 0.2785
0.9058 0.6324 0.5469
0.1270 0.0975 0.9575
>> K(:,1)
ans =
0.8147
0.9058
0.1270
但是,如果我做转置矩阵的索引操作,MATLAB抛出一个错误:
>> K'(:,1)
K'(:,1)
↑
Error: Unbalanced or unexpected parenthesis or bracket.
>> (K')(:,1)
(K')(:,1)
↑
Error: Unbalanced or unexpected parenthesis or bracket.
有没有人有这个想法?
工作,你有我的点给予好评:-) –