why do I get this error while using find to determine the element in my list?

2 次查看(过去 30 天)
Hello dear friends.
I am encountring an error wile using the find command. could you please help.
kff is vector and my k flutter is equal to 0.3000.
when i enter 0.3000 directly to my find command it works but when i enter k_flutter it is not working.
thanks.

采纳的回答

KSSV
KSSV 2022-1-17
You should not comapre floating point numbers like that.
Try:
tol = 10^-5 ; % try changing the tolerance
find(abs(kff-k_flutter)<tol)
  3 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by