MATLAB Answers

Could anyone help me how to find the difference between the two columns in 10x2 double

1 ビュー (過去 30 日間)
jaah navi
jaah navi 2021 年 7 月 18 日
編集済み: Jonas 2021 年 7 月 18 日
How to find the difference between the first column and second column in
A{1,1}
present in the following manner.
0 1
0 -1
3 0
2 0
0 1
7 0
4 0
9 0
2 0
0 1
  2 件のコメント
jaah navi
jaah navi 2021 年 7 月 18 日
I am also trying from my side to learn. As I am unable to get the correct result. I am asking for help.

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

回答 (2 件)

Yazan
Yazan 2021 年 7 月 18 日
Read about Matlab cell arrays and how to access their data here.
for your question, do the following:
A{1,1}(:,1) - A{1,1}(:,2)

Jonas
Jonas 2021 年 7 月 18 日
編集済み: Jonas 2021 年 7 月 18 日
use
diff(A{1,1},1,2)
to get all first order differences between columns for every row

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by