Round all values in table
조회 수: 45 (최근 30일)
이전 댓글 표시
Hi,
I have a table with calculated values. Now I want to round all values to 2 decimals. How can I do that in once for the whole table?
댓글 수: 0
답변 (1개)
Scott MacKenzie
2021년 10월 25일
편집: Scott MacKenzie
2021년 10월 25일
I think this achieves what you are after:
% test data
T1 = array2table(rand(5))
% rounded to 2 decimal places
T2 = array2table(round(T1{:,:},2))
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!