Convert float numbers (double) to fractions (string)
R = double2fraction(X,tol) returns a cell array R containing strings of signed fractions for double numbers stored in N-dimensional matrix X and within an optional tolerance tol (default 0.01).
Does basically the same job as R = rats(X), but rats takes the string length as a restricting condition, while the provided function takes the absolute error tolerance.
See example.m for usage.
Citation pour cette source
Yumeng (2024). Convert float numbers (double) to fractions (string) (https://www.mathworks.com/matlabcentral/fileexchange/86800-convert-float-numbers-double-to-fractions-string), MATLAB Central File Exchange. Récupéré le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
Version | Publié le | Notes de version | |
---|---|---|---|
1.0.0 |