필터 지우기
필터 지우기

on rounding decimals at a specific digit

조회 수: 3 (최근 30일)
Mohammad Farhat
Mohammad Farhat 2018년 7월 10일
답변: Brian Cianciola 2018년 7월 10일
Howe can i truncate my decimals at a certain digit, round is not working "Error using sym/round Too many input arguments"

답변 (2개)

Image Analyst
Image Analyst 2018년 7월 10일
Evidently you have an old version of MATLAB where you can't specify the number of digits in round(), but you're calling round with the second argument as if you did have a modern version.
It seems you forgot to fill out your release when you were making the post so no one knows what version you have, so all I can say (unless you add your release) is that you have an old version before the number of digits option was introduced.
  댓글 수: 1
Mohammad Farhat
Mohammad Farhat 2018년 7월 10일
I have the 2015a version, and the option where I can specify the number of digits is working but not always. I have a matrix of numerical elements (sold(n,m)) when i try in the command window round (sold(1,2), 2) for example it gives the aforementioned error, but when I enter the value instead of sold, it works

댓글을 달려면 로그인하십시오.


Brian Cianciola
Brian Cianciola 2018년 7월 10일
I can't be exactly sure since I can't see your code, but I think what you're looking for is the roundn() function.

카테고리

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