Finding unique dates in vector
이전 댓글 표시
Hi all.
I have a vector of dates where each date is repeated many times. How would i create a vector with every date but no repetitions efficiently?
Thx.
댓글 수: 1
Jan
2011년 5월 25일
What exactly means "vector of dates"? Please post the type of the input exactly. I assume that UNIQUE will help you directly.
채택된 답변
추가 답변 (1개)
Daniel Svedbrand
2025년 3월 12일
편집: Daniel Svedbrand
2025년 3월 12일
0 개 추천
unique_dates = unique(dateshift(Date,'start','day'));
if Date are datetimes, otherwise
unique_dates = unique(dateshift(datetime(Date),'start','day'));
카테고리
도움말 센터 및 File Exchange에서 Time Series Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!