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

조회 수: 1 (최근 30일)
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
KSSV
KSSV 2021년 7월 18일
@jaah navi You have asked so far many easy questions. I guess you would have asked around 300+ questions and you never cared to learn the basics of MATLAB. Instead of asking basic questions here and waititng for the answer, you can learn basics.
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

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by