convert specific vector to vector in one direction
조회 수: 1 (최근 30일)
이전 댓글 표시
if i have av=[1 2;3 4;2 1;4 3] and i want the result a=[1 2;3 4]
댓글 수: 0
답변 (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),:);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!