How to convert day information to a number?
2 ビュー (過去 30 日間)
古いコメントを表示
How can I convert day information to a number?
For instance, Mon to 1, Tue to 2, etc.
Fo from character to number data.
0 件のコメント
採用された回答
Star Strider
2021 年 9 月 24 日
Experiment with something like this —
daynr = @(x) find(strcmp(x, {'Mon','Tue','Wed','Thu','Fri','Sat','sun'}));
nr = daynr('Thu')
Everything depends on the context it will be used in, so this is just an example of one approach.
.
2 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Whos についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!