Question:
I need a MATLAB function?
anonymous
2009-05-03 01:39:41 UTC
I need a MATLAB function wich inhance precision in numerical calculation. I want to substract two huge number and i need a good precision to do that.
Three answers:
JoeSchmo5819
2009-05-03 01:50:48 UTC
How huge is "huge"? MATLAB's precision is IEEE Floating Point (about 16 decimal digits) and you can set MATLAB to display this in exponential form by typing "format long e".



If you have the Symbolic Math Toolbox, you can use its Variable Precision Arithmetic feature to increase the precision. Here's how it works: http://www.mathworks.com/products/symbolic/demos.html?file=/products/demos/shipping/symbolic/symvpademo.html



Other than that, I would suggest checking out the MATLAB File Exchange for something that does indefinite precision. Google "MATLAB File Exchange".
?
2016-12-03 11:35:29 UTC
(sin(x))^x = e^(x * ln(sin(x))) This functionality will for sure be defined each and every time sin(x) is postive, this is while 2n? < x < (2n + a million)?, the place n is any integer. Now, all this is left to make certain is the places the place the functionality would be defined while sin(x) is adverse. while sin(x) is adverse, enable sin(x) = -a, the place a = |sin(x)|. So, the functionality will become: e^(x * ln(-a)) = e^(x * (i? + ln(a))) = e^(xi? + xln(a)) = e^(xi?) * e^(xln(a)) This functionality is defined each and every time e^(xi?) is a real variety, which purely happens while x is an integer. So, the area of the functionality would be {(2?n, (2? + a million)n); n ?Z} ?{ok; ok?Z}. wish this permits. Edit : Yeah, its real that this fuction would not have a non-end area the two for constructive or adverse x. As for the rational powers, i'm having my doubts. Is the cube root of -a million, working example, genuine or not? This has 3 values, of which one is genuine and the different 2 at the instant are not. properly, it relatively relies upon on the kind you define exponents. So, now we could desire to look for a definition for a^b, the place a and b could be any complicated numbers. we can define it as 'a expanded b situations' yet this definition works purely while b is a good integer. we can boost it for adverse integers and finally all rational numbers, in spite of the undeniable fact that it stops there. we will not use this definition to evaluate something like 2^?. this is the place the exponential functionality is obtainable in. If we write 2^? as e^(?ln(2)), we can effectively evaluate its vaue utilising the potential sequence advance for e^x or something like that. So we now have definted the exponential functionality for all complicated numbers a and b. Now, we can evaluate (-a million)^(a million/3) utilising this defintion. Write (-a million)^(a million/3) as e^(a million/3 * ln(-a million)) = e^(i?/3) = cos(?/3) + i sin(?/3) = a million/2 + ?3i/2, which isn't genuine. So, in accordance to this definition for exponents, the popular cube root of -a million isn't genuine. So, (sin(x))^x would not have a internet site for all rational x with atypical denominators and is defined purely for necessary values of x.
anonymous
2009-05-03 01:45:02 UTC
INHANCE!!! LOOOOL


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...