Indexnummer eines DateTime Array mit Prozent finden
Ältere Kommentare anzeigen
Ich suche den Index eines Zeitpunktes aus einem DateTime Array 90% vom gesamten set.
Das ist das original mit einem Zeitpunkt als Suche.
backtest_start_idx = find(date_vector < datetime(2022,2,1),1,'last')
Hier der Versuch mit 90% als Suche.
Es werden aber realnumbers erwartet.
backtest_start_idx = prctile(date_vector,90)
1 Kommentar
Christian Bothe
am 25 Jan. 2025
Antworten (0)
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!