How does the ischange function handle 3D vectors and a set 'threshold'?

5 views (last 30 days)
I am running the ischange function on an Nx3 matrix of 3D vector data (vector angles wrt axis). I understand that the ischange function detects significant changes in data. My question is how is it detecting those changes? Does it take a column of data and compare the top and bottom neighboring cell values? Does it take a row of data and compare the values on either side of the cell? Does it take the entire vector (3 angles wrt X,Y,Z axes) and compare it with the neighboring cell vectors? Or does it take the vector and compare it with all the neighboring vectors in the 3D image?
Additionally, how does the 'threshold' change the results? Initially I believed that the threshold was the value you set to tell the function what is considered an "abrupt" change, but after reviewing the function documentation I see that this is not the case. However, I still do not understand what the 'threshold' does.
Using Matlab R2021a
  1 Comment
DGM
DGM on 11 Nov 2021
If nothing else, you could always just open ischange.m and browse the code. There are a number of reference papers listed in the internal comments.

Sign in to comment.

Answers (1)

Aneela
Aneela on 26 May 2024
Hi Marina Baltz,
The “ischange” function in MATLAB detects significant changes in the array or vector and returns a logical array when there is an abrupt change in the mean of the corresponding elements of the array.
For an NX3 matrix, the behaviour depends on the function’s parameters:
  • If the dimension argument is not specified, “ischange” operates on each column independently, compares each element in a column to its neighbouring elements in the same column to detect changes.
  • If the dimension argument is specified:
A=ischange(A,2);
It computes change points for each row of matrix ‘A’.
  • The 'threshold' parameter influences how much the residuals (differences between the actual data points and the model's predictions) can vary before a change is detected.
  • A higher 'threshold' value makes the function less sensitive to changes, requiring a more significant deviation from the linear model before detecting a change.
For more information on “ischange”, please refer to the following MathWorks documentation: https://www.mathworks.com/help/matlab/ref/ischange.html

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!