How to subtracts elements in a list
Show older comments
I have list like;
A = [x1,x2,x3,x4];
i want a list which can subtract first element with all other element and so on.\
i need results like [x1-x2,x1-x3,x1-x4,x2-x3,x2-x4,x3-x4]
Any help would be appreciable.
Thanks in advance
Accepted Answer
More Answers (1)
Matt J
on 28 Jun 2019
A(:)-A(:).'
Categories
Find more on Whos 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!