Fractions in "fprintf"
Afficher commentaires plus anciens
This issue is relative of converting decimals into fractions inside fprintf. I've tried using "sym", but the points still appear to be decimal.
x=0.25;
y=0.75;
fprintf('This is the Optimal Solution: [%f, %f]\n', sym(x), sym(y))
It will be a great help if anyone figure out the way to do this. Thank You.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Common Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!