How to solve incosistent scientific format ?

2 vues (au cours des 30 derniers jours)
Arif
Arif le 8 Mar 2024
Déplacé(e) : Stephen23 le 11 Mar 2024
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 commentaire
Stephen23
Stephen23 le 8 Mar 2024
Déplacé(e) : Stephen23 le 11 Mar 2024
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

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 8 Mar 2024
  1 commentaire
Arif
Arif le 11 Mar 2024
hey thank you so much. u solved my problem. But what is the difference ?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Characters and Strings dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by