Convert float numbers (double) to fractions (string)

版本 1.0.0 (1.6 KB) 作者: Yumeng
Convert signed float numbers to signed fractions as strings. Matrix-compatible.
15.0 次下载
更新时间 2021/2/2

查看许可证

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