How can I subtract the two columns of the same matrix?
30 views (last 30 days)
Show older comments
Efe IST
on 7 Oct 2015
Commented: Walter Roberson
on 7 Oct 2015
How can I subtract the two columns of the same matrix?
0 Comments
Accepted Answer
Walter Roberson
on 7 Oct 2015
diff(YourMatrix,2)
or
YourMatrix(:,2) - YourMatrix(:,1)
2 Comments
Walter Roberson
on 7 Oct 2015
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!