Can the output of the weekday function be modified to return different numbers?
1 回表示 (過去 30 日間)
古いコメントを表示
Can the output of the weekday() function be modified like the excel weekday function so that Monday = 1 rather than Monday =2? I can always map it after the fact but it would be better if the function could just return the different number.
0 件のコメント
採用された回答
Rik
2017 年 11 月 16 日
Depending on your release (and maybe even OS), you might be able to edit the internal Matlab function, but you shouldn't. It is best to modify your code to correct for the difference between what you need and what you get. (the mod function can help with the wrap-around)
Editing internal functions is a bad idea, because it removes any form of portability. If you choose to re-install Matlab, or install a newer release, you will have to re-apply the change, which might not be possible. You might also break other function (both internal function and function written by others (teachers/FEX submissions)).
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Calendar についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!