How to get a msgbox with several lines of texts showing different variables?
조회 수: 2 (최근 30일)
이전 댓글 표시
Ive been working on a code and at the end I want a message box to pop up telling the user how many files were processed and how much time it took, ideally in the same message box. I want them on different lines but in the same box. Below is the code I wrote but I cant figure out how to make it work, ive tried several different formats. Thanks for any help in advance!
msg = sprintf(['Total files processed: %.0f', 1:numel(S); 'Elapsed Time: %.2f', toc]);
l = msgbox(msg);
댓글 수: 0
채택된 답변
Voss
2024년 3월 16일
msg = sprintf('Total files processed: %d\nElapsed Time: %.2f', numel(S), toc);
l = msgbox(msg);
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!