# Calcdifference

## Contents

### Purpose

Calculate normalized difference between two datasets.

### Synopsis

[diffval, diffvalstr] = calcdifference(x1,x2)

### Description

Calculate normalized difference between 2 datasets (scaled to the first dataset input)

diffval = ${\displaystyle {\frac {{\text{norm}}\left(x_{1,incl}(:)-x_{2,incl}(:)\right)}{{\text{norm}}\left(x_{1,incl}(:)\right)}}}$

where the designation ${\displaystyle x_{i,incl}(:)}$ specifies that only included data (all modes) are used in the calculation.

#### Inputs

• x1 = dataset to be compared to; difference is scaled relative to this response
• x2 = dataset to be compared to x1

#### Outputs

• diffval = normalized difference between x1 and x2.
• diffvalstr = string representation of diffval.