Is there a matlab function similar to numpy.spacing

조회 수: 2 (최근 30일)
Adam Stevens
Adam Stevens 2019년 9월 17일
댓글: Adam Stevens 2019년 9월 18일
Is there a matlab function similar to numpy.spacing ?
  댓글 수: 2
John D'Errico
John D'Errico 2019년 9월 17일
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 2019년 9월 18일
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.

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

채택된 답변

James Tursa
James Tursa 2019년 9월 17일
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.

추가 답변 (0개)

카테고리

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