finding a change in a matrix

조회 수: 2 (최근 30일)
joseph Frank
joseph Frank 2012년 2월 6일
Hi,
I have a matrix in which each column is usually constant but sometimes the value changes. Is there a way to figure out where the change occurs without running loops? for example A=[ 1 2 3 4 5; 1 2 3 4 5; 1 2 2 4 5; 1 2 2 4 5]
is it possible to compute that observation A(3,3) has changed?

채택된 답변

Sean de Wolski
Sean de Wolski 2012년 2월 6일
changes_in_columns = diff(A,1,1)

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by