Help on creating a new column and fill values at specific locations
Ältere Kommentare anzeigen
Hello!
I have three column vectors:
- one is the message type (1-15)
- another is the start time when the message is desplayed (0 until end of trials)
- another is vector with each row being each second of the trial (total 2000 seconds/rows)
However, what I want to do is make a new column vector that is the same size of the vector 3 (all time points) with values from vector 1 inserted in positions that corresponds to each timing of the message.
For example:
1 = [1,2,3,4]
2 = [3,6,8,10]
3 = [0,1,2,3,4,5,6,7,8,9,10]
new vector = [0,0,1,1,1,2,2,3,3,4]
Does this make sense?
Thank you so much for any answer!
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Multidimensional Arrays finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!