File: mtx_element.md

package info (click to toggle)
pd-iemmatrix 0.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,576 kB
  • sloc: ansic: 15,440; makefile: 291; sh: 169
file content (34 lines) | stat: -rw-r--r-- 930 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
title: mtx_element
description: set elements of a matrix
categories:
- object
pdcategory: Matrix Creation
see_also:
- matrix
- mtx_row
- mtx_col
inlets:
  1st:
  - type: float
    description: new value for selected matrix element(s)
  - type: matrix
    description: new values for all matrix elements
  2nd:
  - type: float float
    description: element 2d position
outlets:
  1st:
  - type: matrix
    description: modified matrix
arguments:
  - type: float float [float float]
    description: "initial matrix dimensions; optional: initial element position"
---

This object allows you to change specific elements of a matrix.
The element to change is selected by its 2D index to the 2nd outlet.

Indices are *`1`-based*, so the position {{<pdmsg 1 1 >}} refers to the element at the 1st column in the 1st row.

You can use `0` as a wildcard index, so the position {{<pdmsg 2 0 >}} refers to all elements in the 2nd row.