displaying element of matrix
조회 수: 2 (최근 30일)
이전 댓글 표시
How can I display a matrix as output of a function which element are two decimal point based number.
댓글 수: 0
채택된 답변
Scott MacKenzie
2021년 5월 2일
편집: Scott MacKenzie
2021년 5월 2일
% assume M is a matrix of numeric values returned by your function
fprintf('%.2f\n', M); % print all the values, 2 decimal places each
댓글 수: 2
Image Analyst
2021년 5월 2일
@Eram Khan, if it did what you want, please "Accept this answer" to award Scott his "reputation points".
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!