Extracting numerator and denominator values from a decimal value
15 views (last 30 days)
Show older comments
I want matlab to automatically extract numerator and denominator values from a decimal value when I enter one.
For example, I entered a value R (Variable) = 6.52 , so matlab should automatically assign L (Numerator) = 652 and M (Denominator) = 100 .
Basically, I'm doing Resampling in Digital Signal Processing course, and whenever I enter the value of resampling factor, I want matlab to automatically extract Interpolation (L) and Decimation (M) factors from that value, for further processing (manual resampling).
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!