필터 지우기
필터 지우기

how can I increase accuracy

조회 수: 16 (최근 30일)
mim
mim 2012년 10월 10일
I am working with a program that deals with very small numbers and I build a matrix that has this very small numbers, is there any way in matlab that I could increase accuracy to deal with this very small numbers like 1^(-12)? can I increase the number of digits that matlab use to save a number? thanks

답변 (4개)

Walter Roberson
Walter Roberson 2012년 10월 10일
10^(-12) is not very small; MATLAB handles that easily.
MATLAB uses IEEE 754 double precision numbers, which have 53 bits of precision (approximately 1 part in 10^16)
You might want to look at the "format" command, to change the default display form of numbers.

José-Luis
José-Luis 2012년 10월 10일
doc vpa
That would work, if you have the symbolic math toolbox.
  댓글 수: 2
mim
mim 2012년 10월 10일
so you mean that I have to solve the problem symbolically and then I use this vpa function to give me more accurate number than when I solve it numerically? and I did not understand how can I use doc here. thanks
José-Luis
José-Luis 2012년 10월 10일
편집: José-Luis 2012년 10월 11일
Just look for vpa in the Matlab documentation. Or type doc vpa at the prompt. You can define a number to have whatever precision you want. It is rather slow though...
However, Walter might be right and you might have more of a display problem (especially if the data is already loaded into your computer). To see if that is so, just type format long in the prompt and look at your values again.

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


Matt J
Matt J 2012년 10월 10일
If you can transform your problem (e.g., by doing 1/x) to deal with very large integers, instead of very small floats, the following might be applicable to you

Andreas Goser
Andreas Goser 2012년 10월 10일
The whole thing might be a display issue like others suggested or it is that the numbers are too small in comparison to other entries in a matrix and thus numberical operations are not returning results you expect. Here you may be abel to scale columns or rows by a factor like 1e3, 1e6

카테고리

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