ReplacePart

Command: ReplacePart


Description

Replaces the elements of array1 specified by the integer or
by array2 with the 2nd argument any and returns the resulting
array.
Parameters

The integer specifies a position in array1. array2 specifies a
multi-dimensional position [i j ...] in array1 or a list of
positions [ [i1 j1 ...] [i2 j2 ...] ...].
Author
Diesmann
Synopsis
array1 any integer ReplacePart -> array3
array1 any array2 ReplacePart
References

[1] The Mathematica Book V4.0 "Part"
Examples

[3 {-11 5} {9} 7] 4 2 ReplacePart
-> [3 4 [9] 7]
[3 [-11 5] [9] 7] 4 [2 1] ReplacePart
-> [3 [4 5] [9] 7]
[3 [-11 5] [9] 7] 4 [[2] [4]] ReplacePart
-> [3 4 [9] 4]
[3 [-11 5] [9] 7] 4 [[2 1] [3 1]] ReplacePart
-> [3 [4 5] [4] 7]

File
lib/sli/mathematica.sli
Remarks

The variant of this function with four arguments is not implemented