필터 지우기
필터 지우기

comparing a cell with the before it, Percentage of change

조회 수: 1 (최근 30일)
Engineer Undergoing
Engineer Undergoing 2021년 7월 21일
댓글: Engineer Undergoing 2021년 8월 5일
Hello everyone,
So I am still learning on Matlab, and so I have two matrices or arrays, A which is 2000x1 and T 2000x1. T is being the time for A. I am trying to determine the rate of change between the cells (each one with its prior or to 5th prior cell) and after that is done I'll simply elimate any cell of A that has a rate of change higher than 5% and it's correlated cell in T. I tried to use 'findchangepoints' but couldn't set such a parameter (percentage/rate of change).
All this effort just to find and extract the steady state of this datagraph, if you have any better ideas please do share.
all comments are appreciated.

채택된 답변

Yazan
Yazan 2021년 7월 21일
If you are defining the rate of change as:
the problem becomes easy. Assuming that you have vectors, just use
delta = diff(x)./x(1:end-1);
Then, you can filter out x based on delta. If you need to detect some abrupt changes in the signal, then there are more sophesticated signal processing techniques, but you need to provide the data and more detail about your problem to get help from the community.
  댓글 수: 2
Engineer Undergoing
Engineer Undergoing 2021년 7월 27일
yes that's one part of it, so what I intially thought was I'd filter out any changes in every 5 cells that are greater than 5% of this materix A.
Engineer Undergoing
Engineer Undergoing 2021년 8월 5일
I figured it out, sure not in an effeiciant timing but I sure did, and it was way easier than I ever anticipated.
So I tried a completely different approach to identfy the socalled stable or linear parts of the data/graph but instead of using "findchangepoints" i tried this time "ischange" after I cleaned up some of the little noise there. the code is below for future reference to anyone.
y=diff(X);
z= ischange(y,'linear');

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by