naneuclideandistance
It computes Euclidean distance between two vectors or matrices even if some of the coordinates/columns are missing. If one of the inputs has one row and the other has ‘m’ rows, then distance is computed between one row and every other row. It is similar to Euclidean Distance except the fact that this works even if some of the values are missing.
Syntax
Distance = naneuclideandistance(X,Y)
Inputs
- X
- First input vector or matrix.
- Y
- Second input vector or matrix.
Outputs
- Distance
- The distance between two inputs.
Example
Example of naneuclideandistance
x = [1, 2, 3];
y = [4, 5, 6];
distance = naneuclideandistance(x, y);
> distance
distance = 3.16227766