How do I use a user input for a desired number of decimal places in an fprintf or similar statement? The instructions are to use the user's input to display or print the correct number of decimal places once calculations are performed. Thanks!
조회 수: 5 (최근 30일)
이전 댓글 표시
I have tried using something like this to no avail:
fprintf('# Negative:\t\t\t\t\t%0.%f',decimal,neg)
Perhaps I need an sprintf statement or disp after the '# Negative' string? Any suggestions are most appreciated.
채택된 답변
추가 답변 (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!