Create a new vector with specific values from other vector

I want to make new vector based on the values of a different one and taking the sixth value from the end (that would be the new last value) and so on every 6 values. Example: Original vector=( a b c d e f g h i j k l m n o p q r s t) New one (t-6) = (c i o) Thanks!

 채택된 답변

Stephen23
Stephen23 2015년 7월 29일
>> V = 'a':'t'
V =
abcdefghijklmnopqrst
>> fliplr(V(end-5:-6:1))
ans =
cio

댓글 수: 3

thanks!!!
My pleasure! On this forum it is polite to Accept answers that best resolve your question.
Done! :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

태그

질문:

2015년 7월 29일

댓글:

2015년 7월 29일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by