I am trying to create a matlab variable that correlates with a vector.
Show older comments
The given vector in my problem is v34= [1:100}. I have to create a MATLAB variable v1 that adds 9 to each one of its 100 elements and a MATLAB variable v2 that adds 3 to each of its odd elements. I have tried using start values and nElements but i keep on getting an error. Am i supposed to use nElements for this kind of problem?
1 Comment
Sagar Damle
on 23 Feb 2014
Does 'odd elements' mean 'elements with odd index'?
e.g. v34(1),v34(3),v34(43) etc. are the odd elements which you want?
Accepted Answer
More Answers (0)
Categories
Find more on Mathematics 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!