exp-mantissa part alone
조회 수: 4 (최근 30일)
이전 댓글 표시
x=4096; expx = large_exp(x) disp(expx);
how to get only the first part(mantissa part of the answer alone to find exponential and use it in program
댓글 수: 0
채택된 답변
Walter Roberson
2011년 9월 11일
x=4096; expx = large_exp(x); mantissa = expx(1);
댓글 수: 6
Walter Roberson
2011년 9월 12일
As the first executable line of your program, put
format long g
After that, you will not get those silly 1.0e+007 * displays, and you will be able to see why the mantissa showed up as 1.3375 instead of 0.000 .
추가 답변 (1개)
the cyclist
2011년 9월 11일
I am not sure what you mean by large_exp(). I assume it is a function you wrote, or maybe it is in a toolbox that I do not have. Regardless, I expect that you can get at what you need by using the floor() function.
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!