Subtraction matrix for all values
Show older comments
column 1 - column 2; column 1 - column 3; column 1 - column 4...(rest of subtractions)..olumn 4 - column 4.
How would I approach this?
Answers (1)
David Hill
on 25 Nov 2020
for m=1:size(A,2)
for n=1:size(A,2)
B(:,(m-1)*size(A,2)+n)=A(:,m)-A(:,n);
end
end
Categories
Find more on Loops and Conditional Statements 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!