How to solve incosistent scientific format ?

1 次查看(过去 30 天)
Hi guys, im facing trouble when i use 'strcmp'. I was trying to get a data from variable "Stepnum" when its "R3Plastic" is 3,673E-06. But i only have string "3,673e-06" which is automatic created in previous calculation.
how to fix the text-formatting scientific, want to make it fix only using "E"
  1 个评论
Stephen23
Stephen23 2024-3-8
移动:Stephen23 2024-3-11
Do not convert to text and compare text.
Compare the numeric values. Best of all by comparing the absolute difference against a tolerance:
abs(A-B)<tol

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2024-3-8

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by