Method on @sym: numel (x)

Return number of elements in symbolic array.

Example:

syms x
A = [1 2 x; x 3 4];
numel(A)
  ⇒ 6

See also: @sym/length, @sym/size.

Package: symbolic