Borrar filtros
Borrar filtros

please tell me what this words "eps" do in this instruction.i searched it from eps doc but i don't understand the application here.

2 visualizaciones (últimos 30 días)
VthL1=-0.25+eps;
VthH1=0.25+eps;

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 24 de Mzo. de 2013
Editada: Azzi Abdelmalek el 24 de Mzo. de 2013
In windows command type
eps
ans =
2.2204e-016eps
eps is a predefined variable
  6 comentarios
Walter Roberson
Walter Roberson el 24 de Mzo. de 2013
There are three numbers between 0.25 and 0.25+eps, namely 0.25+eps/4, 0.25+2*eps/4, and 0.25+3*eps/4. These can also be written 0.25+eps(0.25), 0.25+2*eps(0.25), and 0.25+3*eps(0.25).
When you see an expression written as (Constant + eps) then often what should have been written is either (Constant + eps(Constant)) or (Constant * (1+eps)) (though the two expressions are not identical if the Constant <= 0)
Suppose you are using a search routine that allows you to provide a lower bound for a value, and it is built in to the search routine that it will allow values that equal that lower bound, but you only want values greater than the lower bound. The trick is to add eps(value) to the value, thus getting "the first representable number greater than the value" as the lower bound that it will actually use.

Iniciar sesión para comentar.

Más respuestas (2)

Nikola
Nikola el 11 de Mzo. de 2015
so if do: find x(x==0)=eps, it will find all values of x that are very close to zero? what about "-eps"? what does that minus sign change?

Nikola
Nikola el 11 de Mzo. de 2015
or it will change all values where x is 0 to very small value?

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by