Convert float numbers (double) to fractions (string)

Version 1.0.0 (1,61 ko) par Yumeng
Convert signed float numbers to signed fractions as strings. Matrix-compatible.
15 téléchargements
Mise à jour 2 fév. 2021

Afficher la licence

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
Créé avec R2020b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Tags Ajouter des tags

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.0.0