# 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.

# `linalg`::`multRow`

Multiply rows with a scalar

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

## Syntax

```linalg::multRow(`A`, `r`, `s`)
linalg::multRow(`A`, `r1 .. r2`, `s`)
linalg::multRow(`A`, `list`, `s`)
```

## Description

`linalg::multRow(A, r, s)` returns a copy of the matrix A resulting from A by multiplying the r-th row of A with the scalar s.

```linalg::multRow(A, r1.. r2, s)``` returns a copy of the matrix `A` obtained from `A` by multiplying those rows whose indices are in the range `r1.. r2` with the scalar `s`.

`linalg::multRow(A, list, s)` returns a copy of the matrix `A` obtained from matrix `A` by multiplying those rows whose indices are contained in `list` with the scalar `s`.

The scalar `s` is converted into an element of the component ring of the matrix `A`. An error message is returned if the conversion fails.

## Examples

### Example 1

We define the following matrix:

`A := matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]])`

and illustrate the three different input formats for `linalg::multRow`:

`linalg::multRow(A, 2, -1)`

`linalg::multRow(A, 1..2, 2)`

`linalg::multRow(A, [3, 1], 0)`

## Parameters

 `A` An m×n matrix of a domain of category `Cat::Matrix` `r` The row index: a positive integer less or equal to m `r1 .. r2` A range of row indices (positive integers less or equal to m) `list` A list of row indices (positive integers less or equal to m)

## Return Values

Matrix of the same domain type as `A`.