subset-.modello_number: Sets the value of a slice in a 'number'

Description Usage Arguments Examples

Description

Sets the value of a slice in a number

Usage

1
2
## S3 replacement method for class 'modello_number'
x[..., dx = FALSE] <- value

Arguments

x

number

...

indexes defining the slice

dx

if TRUE the slice is taken from the gradient

value

value to set

Examples

1
2
3
4
5
6
7
8
modello.init(10, 10, 10, 10)
x = number(matrix(rnorm(9), 3, 3))
print(x$v)
x[1,1] = -100
print(x$v)
x[1:2,1:2] = 100
print(x$v)
modello.close()

modello documentation built on Feb. 2, 2021, 9:06 a.m.