Learn R Programming

OpenImageR (version 1.3.0)

norm_matrix_range: Normalize a matrix to specific range of values

Description

Normalize a matrix to specific range of values

Usage

norm_matrix_range(data, min_value = -1, max_value = 1)

Value

a matrix

Arguments

data

a matrix

min_value

the new minimum value for the input data

max_value

the new maximum value for the input data

Examples

Run this code

set.seed(1)
mt = matrix(1:48, 8, 6)

res = norm_matrix_range(mt, min_value = -1, max_value = 1)

Run the code above in your browser using DataLab