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 日

0 投票

>> V = 'a':'t'
V =
abcdefghijklmnopqrst
>> fliplr(V(end-5:-6:1))
ans =
cio

3 件のコメント

Pablo Ruiz
Pablo Ruiz 2015 年 7 月 29 日
thanks!!!
Stephen23
Stephen23 2015 年 7 月 29 日
My pleasure! On this forum it is polite to Accept answers that best resolve your question.
Pablo Ruiz
Pablo Ruiz 2015 年 7 月 29 日
Done! :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

タグ

質問済み:

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