필터 지우기
필터 지우기

How to round numbers in the matrix

조회 수: 18 (최근 30일)
M
M 2022년 10월 10일
답변: Ghazwan 2022년 10월 10일
There is a matrix 3×3 containing numbers from 0 to 1, but each number contains many decimals such as 0.120886554436, 0.0925684799, and so on... How can I round each number in the matrix to three decimals, for example, to make the number as the following 0.121, 0.092,....?

채택된 답변

Ghazwan
Ghazwan 2022년 10월 10일
Y = round(X,N)
% For more info: https://www.mathworks.com/help/matlab/ref/round.html

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by