Learn R Programming

RobustGaSP (version 0.6.6)

euclidean_distance: Euclidean distance matrix between two input matrices

Description

Function to construct the euclidean distance matrix with the two input matrices.

Usage

euclidean_distance(input1, input2)

Value

The euclidean distance matrix with the number of rows and the number of columns being the number of rows in the first and second input matrices.

Arguments

input1

A matrix of input with the number of rows being the number of observations and the number of columns being the number of variables

input2

A matrix of input with the number of rows being the number of observations and the number of columns being the number of variables

Author

tools:::Rd_package_author("RobustGaSP")

Maintainer: tools:::Rd_package_maintainer("RobustGaSP")

Examples

Run this code
  # dimensional of the inputs
  dim_inputs <- 8    
  
  # number of the inputs
  num_obs <- 30       
  
  # uniform samples of design
  input <-matrix(runif(num_obs*dim_inputs), num_obs,dim_inputs) 

  # the Euclidean distance matrix 
  R0=euclidean_distance(input, input)

Run the code above in your browser using DataLab