Are there any functions for taking the most/least significant digits from a given value?
이전 댓글 표시
Title kinda says it all.
If there isn't a function, can anyone think of a way of writing one to do it efficiently? I'm generating long streams of outputs (experimenting with random number generator implementations) and don't want to bog the whole thing down running a ton of weird arithmetic just to lop a few digits off one end of the output.
Thanks in advance
Will
댓글 수: 2
Walter Roberson
2011년 2월 4일
Are these integers or floating point numbers? There are relatively few floating point numbers that can be truncated to a decimal number that happens to be exactly representable as a binary floating point number.
Will
2011년 2월 4일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!