フィルターのクリア

Differences Of The Elements Of A Matrix.

6 ビュー (過去 30 日間)
Pranjal Pathak
Pranjal Pathak 2012 年 1 月 17 日
Hi, I have a problem which may be very simple for others but since I am very new to MATLAB I am facing some problem regarding the same.
I have a 128-by-128 matrix. I need to find the differences of the adjacent elements(i.e., 2nd element- 1st element,3rd element- 2nd element...so on),firstly along the rows and secondly along the columns to give two different matrices(using the 'diff'command). Can anyone please help me out in solving this problem?
Thanking You!

採用された回答

Andrei Bobrov
Andrei Bobrov 2012 年 1 月 17 日
doc diff
eg:
H = diff(I,1,2) % differences between columns
V = diff(I) % differences between rows
  1 件のコメント
Pranjal Pathak
Pranjal Pathak 2012 年 1 月 23 日
Thank you sir!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by