Create a new vector with specific values from other vector

2 views (last 30 days)
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!

Accepted Answer

Stephen23
Stephen23 on 29 Jul 2015
>> V = 'a':'t'
V =
abcdefghijklmnopqrst
>> fliplr(V(end-5:-6:1))
ans =
cio

More Answers (0)

Tags

Products

Community Treasure Hunt

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

Start Hunting!