how to form a new vector from an old one with a loop
Mostrar comentarios más antiguos
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 comentarios
Rik
el 20 de Ag. de 2021
What have you tried, and can you give a small example?
Mohammed Lamine Mekhalfia
el 20 de Ag. de 2021
Respuestas (0)
Categorías
Más información sobre Variables en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!