Documentation

# `solvelib`::`cartesianPower`

Cartesian power of a set

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

### Domain Creation

`solvelib::cartesianPower()`
`solvelib::cartesianPower(`S`, `n`)`

## Description

`solvelib::cartesianPower` is the domain of all cartesian powers of subsets of the complex numbers.

`solvelib::cartesianPower(S, n)` returns the set of all n-tuples of elements of `S`.

`solvelib::cartesianPower(S, n)` returns the `n`-fold cartesian product of `S` with itself, that is, the set of all vectors of length `n` whose components are elements of `S`.

`S` must represent a subset of the complex numbers; see `solve` for an overview of the different kinds of sets in MuPAD®.

The set of one-tuples of elements of `S` consists of vectors and therefore differs from the set `S` in the same way as matrices of type `matrix` with one row and one column are different from numbers.

## Superdomain

`Dom::BaseDomain`

## Categories

`Cat::Set`

## Examples

### Example 1

A cartesian power of a finite set of numbers is a finite set of vectors:

`A:= solvelib::cartesianPower({1, 2, I}, 3)`
` `

We can select those vectors with all components real as follows:

`A intersect solvelib::cartesianPower(R_, 3)`
` `

### Example 2

Cartesian powers of the set of complex numbers may occur as the result of a call to `solve` if every n-tuple of complex numbers is a solution of the given system:

`solve([x+y = x+y], [x, y], VectorFormat)`
` `

## Parameters

 `S` Set `n` Positive integer

## Methods

expand all

#### Access Methods

`base(A)`

`dimension(A)`

#### Technical Methods

`print(A)`

#### Mathematical Modeling with Symbolic Math Toolbox

Get examples and videos