Sum (rendezvous equation) in matlab

I want to write the below equation(rendezvous) in matlab, i belongs to {1,2,…,7} , write a for loop for i and a switch for j, but I don’t know how to write the sum properly, will you help

Antworten (1)

Andrei Bobrov
Andrei Bobrov am 2 Jul. 2016

2 Stimmen

out = sum(bsxfun(@minus,x(:),x(:)'),2);

Kategorien

Mehr zu Mathematics finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 2 Jul. 2016

Beantwortet:

am 2 Jul. 2016

Community Treasure Hunt

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

Start Hunting!

Translated by