can i obtain this vector ?

1 Ansicht (letzte 30 Tage)
diadalina
diadalina am 20 Okt. 2017
Beantwortet: Jan am 20 Okt. 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 ?

Akzeptierte Antwort

Stephen23
Stephen23 am 20 Okt. 2017
Bearbeitet: Stephen23 am 20 Okt. 2017
>> V = 0:5;
>> 2*V + mod(1+V,2)
ans =
1 2 5 6 9 10
See also:

Weitere Antworten (1)

Jan
Jan am 20 Okt. 2017
V = cumsum([3, 1, 3, 1, 3, 1]) - 2

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by