Azzera filtri
Azzera filtri

can i obtain this vector ?

2 visualizzazioni (ultimi 30 giorni)
diadalina
diadalina il 20 Ott 2017
Risposto: Jan il 20 Ott 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 ?

Risposta accettata

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

Più risposte (1)

Jan
Jan il 20 Ott 2017
V = cumsum([3, 1, 3, 1, 3, 1]) - 2

Categorie

Scopri di più su Multidimensional Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by