Skip to content

simplify

general · scripts/general/simplify.m

SIMPLIFY  Algebraic simplification (MATLAB R2026a Symbolic Math Toolbox API).
  S = simplify(EXPR) simplifies EXPR. Core Lane-A covers:
    * char whitespace collapse (GitLab #288),
    * univariate polynomial / rational expressions (combine like terms,
      cancel polynomial GCD) including the 50-term bench (nexus#2064).

  Name-Value (MATLAB R2026a defaults):
    Steps                      1
    Seconds                    Inf
    Criterion                  'default'
    All                        false
    IgnoreAnalyticConstraints  false

  Decisions (MATLAB R2026a doc + tip-2 / val-sym-008):
  * sym/char polynomial input returns the same kind (classdef sym, struct
    tip, or char). Numeric non-sym input is returned unchanged.
  * x+x -> 2*x; (x^2-1)/(x-1) -> x+1; already-canonical sum of N distinct
    powers is unchanged up to term order (high degree first, no spaces).
  * All=true returns a column cell of the simplified form (one form for
    this Lane-A engine). Steps/Seconds are accepted; deeper search is a
    no-op beyond the fixed poly/rational rewrite.
  * Missing EXPR -> MATLAB:narginchk:notEnoughInputs.
  * Unknown name -> MATLAB:InputParser:ParamNameNotRecognized.