Could anyone help me how to find the difference between the two columns in 10x2 double
Show older comments
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 Comments
KSSV
on 18 Jul 2021
@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
on 18 Jul 2021
Answers (2)
Yazan
on 18 Jul 2021
for your question, do the following:
A{1,1}(:,1) - A{1,1}(:,2)
use
diff(A{1,1},1,2)
to get all first order differences between columns for every row
Categories
Find more on Multidimensional Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!