The Octave Forge package repository is no longer actively maintained. Please find Octave Packages at https://packages.octave.org.

Navigation

Operators and Keywords

Function List:

C++ API

Method on @sym: frac (x)

Return the fractional part of a symbolic expression.

Examples:

y = frac(sym(3)/2)
  ⇒ y = (sym) 1/2

syms x
rewrite(frac(x), 'floor')
  ⇒ ans = (sym) x - ⌊x⌋

See also: @sym/ceil, @sym/floor, @sym/fix, @sym/round.

Package: symbolic