source:
trunk/src/round_uvmat.m
@
1129
Last change on this file since 1129 was 1078, checked in by , 5 years ago | |
---|---|
File size: 252 bytes |
Line | |
---|---|
1 | % provide a simple round value of Val of the form 1, 2 , 5 *10^n |
2 | function RoundVal= round_uvmat(Val) |
3 | |
4 | ord=10^(floor(log10(Val)));%order of magnitude |
5 | if Val/ord >= 5 |
6 | RoundVal=5*ord; |
7 | elseif Val/ord>=2 |
8 | RoundVal=2*ord; |
9 | else |
10 | RoundVal=ord; |
11 | end |
12 |
Note: See TracBrowser
for help on using the repository browser.