image thumbnail

Convert Fractions to Same Denominator (same_denominator)

version 2.0.2 (7.26 KB) by Tamas Kis
Scales a set of fractions so they each have the same denominator.

6 Downloads

Updated 28 Aug 2021

From GitHub

View license on GitHub

same_denominator View Convert Fractions to Same Denominator (same_denominator) on File Exchange

Scales a set of fractions so they each have the same denominator.

Syntax

[num,gcd] = same_denominator(X)
[num,gcd] = same_denominator(X,'print')
same_denominator(X,'print')

Description

[num,gcd] = same_denominator(X) converts all the fractions in X so they have the same denominator. The resulting scaled numerators are returned in the array num, which is an array of the same size as X, and the greatest common divisor of the elements of X is returned as gcd.

[num,gcd] = same_denominator(X,'print') does the same as the above syntax, but also prints the new fractions.

same_denominator(X,'print') converts all the fractions in X so they have the same denominator and prints the results.

Examples

  • See "EXAMPLES.mlx" or the "Examples" tab on the File Exchange page for examples.

Cite As

Tamas Kis (2021). Convert Fractions to Same Denominator (same_denominator) (https://github.com/tamaskis/same_denominator-MATLAB/releases/tag/v2.0.2), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2021a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.