can i obtain this vector ?

1 view (last 30 days)
diadalina
diadalina on 20 Oct 2017
Answered: Jan on 20 Oct 2017
can anyone help me to obtain this vector: v=[1 2 5 6 9 10]; i want to know, if we can obtain a relation beteween the vector's elements ?

Accepted Answer

Stephen23
Stephen23 on 20 Oct 2017
Edited: Stephen23 on 20 Oct 2017
>> V = 0:5;
>> 2*V + mod(1+V,2)
ans =
1 2 5 6 9 10
See also:

More Answers (1)

Jan
Jan on 20 Oct 2017
V = cumsum([3, 1, 3, 1, 3, 1]) - 2

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by