Asking a user in the command window to enter YYYY-MM-DD HH-MM-SS-MS
조회 수: 1 (최근 30일)
이전 댓글 표시
How do I create a script that asks for a user to input date/time data in the form YYYY-MM-DD HH-MM-SS-MS? I want the user to enter this information in the command window after I click "Run"
댓글 수: 0
답변 (1개)
Walter Roberson
2021년 10월 12일
T = input('Enter time in the form YYYY-MM-DD HH-MM-SS-MS: ', 's')
This will give back a character vector that has not been validated.
댓글 수: 3
Walter Roberson
2021년 10월 12일
And why are you passing the result of the input() to input() as the prompt?
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!