finding a change in a matrix

1 回表示 (過去 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 Center および File ExchangeElementary Math についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by