for j=1:1:10
distance=sqrt((S(j).xd-sink.x)^2 + (S(j).yd-sink.y)^2);
Etotal=PL*(ETX+Efs*(distance).^2);
sum(Etotal)
end
please i want to find sum Etotal. i did it but the last Etotal generated is display as sum of the total. please i need help to find sum Etotal i.e from 1 to 10 once.
thanks
distance=sqrt((S(j).xd-sink.x)^2 + (S(j).yd-sink.y)^2);
Etotal=PL*(ETX+Efs*(distance).^2);
sum(Etotal)
end
please i want to find sum Etotal. i did it but the last Etotal generated is display as sum of the total. please i need help to find sum Etotal i.e from 1 to 10 once.
thanks