can i obtain this vector ?

1 次查看(过去 30 天)
diadalina
diadalina 2017-10-20
回答: Jan 2017-10-20
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 ?

采纳的回答

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

更多回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by