solvelib::cartesianProduct

Cartesian product of sets

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Syntax

solvelib::cartesianProduct(S, …)

Description

solvelib::cartesianProduct(S,...) returns the cartesian product of its arguments.

The arguments may be sets of any type, consisting of complex numbers; the result is a set that consists of vectors, or a symbolic call to solvelib::cartesianProduct. See solve for an overview of the different kinds of sets in MuPAD®.

Examples

Example 1

For finite sets, the result is similar to that of combinat::cartesianProduct but consists of vectors and not of lists:

S:= solvelib::cartesianProduct({1, 2}, {3, 4})

solvelib::splitVectorSet(S)

delete S:

Example 2

For infinite sets, results of various types are possible, e.g., solvelib::VectorImageSet or solvelib::cartesianPower:

solvelib::cartesianProduct(R_, R_)

solvelib::cartesianProduct(PI*Z_, Z_)

Parameters

S

Set of complex numbers

Return Values

Set