logarithmic rounding

버전 1.1.0.0 (2.26 KB) 작성자: Phillip M. Feldman
does logarithmic rounding using any of 7 modes
다운로드 수: 1.5K
업데이트 날짜: 2009/5/13

라이선스 보기

roundl is a MATLAB function that does base-10 logarithmic rounding.

Syntax:

y= roundl(x, mode, n)

The value y is x rounded to a number of the form a*10^n, where n is an integer and a is one of a small number of multipliers.

x, the number to be logarithmically rounded, must be positive.

mode (optional) specifies the rounding direction. If specified, mode must be 'u' (round up), 'd' (round down), or 'n' (round to nearest); 'n' is the default.

n (optional) specifies the number of values per decade and thus determines the allowed multipliers. Allowed values of n are 1-7. The default value for n is 3; n= 5 and n= 7 are not commonly used. The following table shows the set of multipliers for each value of n:

1: 1
2: 1, 3
3: 1, 2, 5
4: 1, 2, 3, 5
5: 1, 2, 3, 5, 7
6: 1, 1.5, 2, 3, 5, 7
7: 1, 1.5, 2, 3, 4, 6, 8

인용 양식

Phillip M. Feldman (2024). logarithmic rounding (https://www.mathworks.com/matlabcentral/fileexchange/24040-logarithmic-rounding), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2008b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Mathematics and Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

Modified code so that input x can be an array of arbitrary shape; the output y will match the shape of x.

1.0.0.0