Is there a matlab function similar to numpy.spacing

3 visualizaciones (últimos 30 días)
Adam Stevens
Adam Stevens el 17 de Sept. de 2019
Comentada: Adam Stevens el 18 de Sept. de 2019
Is there a matlab function similar to numpy.spacing ?
  2 comentarios
John D'Errico
John D'Errico el 17 de Sept. de 2019
It would be far easier to answer, if you actually told people what that code does in python. Even give an example.
Adam Stevens
Adam Stevens el 18 de Sept. de 2019
Well its a little hard to explain. I thought a google search would be easier.
It gives the difference between a number and the next clossest number depending on the precission being used.
Here is the documentation
It is used in scipy's DARE solution to check for stability.

Iniciar sesión para comentar.

Respuesta aceptada

James Tursa
James Tursa el 17 de Sept. de 2019
From the numpy.spacing doc:
"It can be considered as a generalization of EPS ... there should not be any representable number between x + spacing(x) and x for any finite x."
Sounds like the MATLAB function eps( ) is what you want.

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB 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