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

답변 (1개)

Andrei Bobrov
Andrei Bobrov 2016년 7월 2일

2 개 추천

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

카테고리

도움말 센터File Exchange에서 Mathematics에 대해 자세히 알아보기

질문:

2016년 7월 2일

답변:

2016년 7월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by