how to form a new vector from an old one with a loop
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mohammed Lamine Mekhalfia
am 20 Aug. 2021
Kommentiert: Mohammed Lamine Mekhalfia
am 20 Aug. 2021
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 Kommentare
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!