Products & Services Solutions Academia Support User Community Company

Learn more about Symbolic Math Toolbox   

frac - Symbolic matrix elementwise fractional parts

Syntax

frac(X)

Description

frac(X) is the matrix of the fractional parts of the elements: frac(X) = X - fix(X).

Example

x = sym(-5/2);
[fix(x) floor(x) round(x) ceil(x) frac(x)]
ans =
[ -2, -3, -3, -2, -1/2]

See Also

round, ceil, floor, fix

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS