Biomech-Sim-Toolbox 1
Toolbox for movement simulation and analysis
Loading...
Searching...
No Matches
Functions
compareElements.m File Reference

Function to find differences between two elements. More...

Functions

function compareElements (in element1, in element2, in diffTabIn, in elemPath)
 Function to find differences between data elements.
 

Detailed Description

Function to find differences between two elements.

Author
Marlies Nitschke
Date
March, 2018

Function Documentation

◆ compareElements()

function compareElements ( in  element1,
in  element2,
in  diffTabIn,
in  elemPath 
)

Function to find differences between data elements.

This function will give you a fast overview what are the differences between two elements. For example, this is usefull to compare two simulation results.

diffTabOut = compareElements(result1, result2)
function compareElements(in element1, in element2, in diffTabIn, in elemPath)
Function to find differences between data elements.

It was implemented recursively. Hence, it is calling itself until it reaches for example a numeric value or a string. The tables containing the differences will be concatenated.

Warning:

  • The function was not fully tested.
  • The function output may be not suitable for your usecase.
  • The comparison of some classes could be missing. In this case, an error will be thrown. => Feel free to extend this function.
Parameters
element1Element of arbitrary class
element2Element of arbitrary class
diffTabIn(optimal)Table: Differences which were already disconvered
elemPath(optimal)String: Path which was used to reach the element (e.g. test.name)
Return values
diffTabInTable: Differences which were disconvered