How does MATLAB 'fill in' elements when subsetting a matrix by vectors?
显示 更早的评论
A = [1, 2, 3;
4, 5, 6;
7, 8, 9];
B = A([end, 1:end], [end, 1:end])
% B =
%
% 9 7 8 9
% 3 1 2 3
% 6 4 5 6
% 9 7 8 9
Why is the first element of matrix B, i.e. B(1,1), 9?
All the other elements seem to follow the 'classic' rules of concatination/subsetting but how does MATLAB 'fill in' element (1,1)?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!