# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# `lhs`

Left side of equations, inequalities, relations, intervals, ranges and tables

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

## Syntax

```lhs(`f`)
```

## Description

`lhs(f)` returns the left side of `f`.

The call `lhs(f)` is equivalent to the direct call `op(f,1)`, of the operand function `op`, if `f` is not a table.

If `t` is a table, the call `lhs(t)` returns the list of keys of the table (left side). Note that the `i`th value in `rhs(t)` corresponds to the `i`th key in `lhs(t)`.

## Examples

### Example 1

Extract the left sides of various objects:

`lhs(x = sin(2)), lhs(3.14 <> PI), lhs(x + 3 < 2*y)`

The operands of an expression depend on its internal representation. In particular, a “greater” relation is always converted to the corresponding “less” relation:

```y > -infinity; lhs(y > -infinity)```

```y >= 4; lhs(y >= 4)```

### Example 2

Extract the left sides of the solution of the following system:

`s := solve({x + y = 1, 2*x - 3*y = 2})`

`map(op(s), lhs)`

Calls to `lhs` can be easier to read than the equivalent calls to the operand function `op`:

`map(op(s), op, 1)`

However, direct calls to `op` must be preferred inside procedures for higher efficiency.

`delete s:`

### Example 3

Extract the keys (left side) and values (right side) from a table:

```t := table(1=2, 4=PI, 5=5.6, 19=1/2): l := lhs(t);```

`r := rhs(t);`

Note that the `i`th value corresponds to the `i`th key:

`bool(r = map(lhs(t), e->t[e]))`

`delete t,l,r:`

## Parameters

 `f` An equation `x = y`, an inequality ```x <> y```, a relation `x < y`, a relation ```x <= y```, an “is element of”-relation ```x in y```, an interval `x...y`, a range `x..y`, or a table `table(x=y,...)`.

`f`