How can I create a string with sprintf based on these data?
조회 수: 2 (최근 30일)
이전 댓글 표시
The goal is to create a string which reads 'day, month, day(num), year' example: 'Sun, Nov 12, 2017' I will link what I have so far down below.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/170486/image.png)
The months are given as a chart which I need to index, so say if the month is 1, the final string would read 'Jan'.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/170487/image.png)
thats what i have so far but it keeps reading error. Thanks in advance.
댓글 수: 0
답변 (1개)
Walter Roberson
2017년 12월 1일
m = m_name(mm, :);
And remember to put in the appropriate commans in formatSpec
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 String Parsing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!