how to form a new vector from an old one with a loop
1 次查看(过去 30 天)
显示 更早的评论
Dear All, I hope that you are all well
I hope I will be able to explain my problem as good as it should.
I have three one column vector, the vectors size is m.
I would like to build a new vector let say we name it VectorA, this vector contain the 1st value of Vector 1 and it will repeat the picking the value at a regular step let say 30 from vector until the end.
Then the vector B it will take the second value from the vector 1 and with the same concept and repeated steps.
the number of vectors created equal to the Number of step used to pick values.
if the size of original vector is not devised on the step chosen, the code need to fill the vector constructed with zeros.
2 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!