convert specific vector to vector in one direction
显示 更早的评论
if i have av=[1 2;3 4;2 1;4 3] and i want the result a=[1 2;3 4]
回答(3 个)
James Tursa
2016-2-19
编辑:James Tursa
2016-2-19
a = av(1:2,1:2);
If this simple solution is not what you are looking for then please give more details in your question.
Based on your reply it looks like you simply want the top half of your matrix. So try this:
[m n] = size(av);
a = av(1:(m/2),:);
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!