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.
引用格式
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. 检索来源 .
MATLAB 版本兼容性
创建方式
R2020b
兼容任何版本
平台兼容性
Windows macOS Linux标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0.0 |