Subtraction matrix for all values

1 visualización (últimos 30 días)
Matthew Worker
Matthew Worker el 25 de Nov. de 2020
Editada: N/A el 4 de Dic. de 2020
column 1 - column 2; column 1 - column 3; column 1 - column 4...(rest of subtractions)..olumn 4 - column 4.
How would I approach this?

Respuestas (1)

David Hill
David Hill el 25 de Nov. de 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

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by