Double sigma with exception case
3 views (last 30 days)
I just tried to coding that. but I can not find out how to make double sigma with exception case.
j=/=i means that if j is equal to i, pass that case.
This is original equation for phi.
I tried like this. is it right direction?
Joseph Cheng on 8 Jun 2021
Edited: Joseph Cheng on 8 Jun 2021
in your nested forloop you can put a check in for if j==i then continue. you do have a check up there with i~=j which should work but you can get rid of the j=j+1 since the for loop will increment j anyways.
for i = 1:4
for j = 1:4
disp(sprintf('i= %i and j= %i',i,j))