How to set the boundaries?
Ältere Kommentare anzeigen
Hello,
Please help me :)
I have a row with 0 and 1 (they are used for classification) and its indexes. I need to get just the boundaries for the interval of 0 or 1. How I can do it?
For example this is what I have:
targets=[0 0 0 1 1 1 0 0 1 1 0 0 0]
index= [0 1 2 3 4 5 6 7 8 9 10 11 12]
This is what I want to get:
targ= [0 1 0 1 0]
boundindex=[0 3 6 8 12]
Thanks!
Akzeptierte Antwort
Weitere Antworten (1)
Ra Ga
am 18 Mär. 2018
0 Stimmen
2 Kommentare
Image Analyst
am 18 Mär. 2018
I don't know what to do. What is your "second answer"?
Ra Ga
am 18 Mär. 2018
Kategorien
Mehr zu Creating and Concatenating Matrices 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!