Soustraction between all line of a matrix
Show older comments
Hello all,
I have a matrix (6964,1) i would like to do a mathemetical operation between each line of the matrix. i mean line 1 with all the line then line 2 with all the line then line 3 with all the line etc. and I would like that the result return into a new matrix. Can someone help mep lease?
Accepted Answer
More Answers (1)
madhan ravi
on 15 Sep 2020
bsxfun(@minus, matrix(:), matrix(:).') % for newer versions bsxfun() is not needed
Categories
Find more on Creating and Concatenating Matrices 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!