can not get the answer
이전 댓글 표시
Could anyone help me with this problem? I can not get the same answer with the book. It should be =147.2551. This is I got so far
V=[3 7 4 5 2 6];
x=[1 7 8 17 22 27];
y=[28 18 16 2 10 8];
for i=1:30;
for j=1:30;
for k=1:6;
d(k)= sqrt((x(k)-i).^2+(y(k)-j).^2);
cost(k)=.5.*d(k).*V(k);
c(i,j)=sum(cost(k));
f=min(c(i,j));
end
end
end
댓글 수: 3
Azzi Abdelmalek
2012년 10월 12일
min(c(i,j)=c(i,j)
sss dzu
2012년 10월 12일
Walter Roberson
2012년 10월 13일
Please read the guide to tags and retag this question; see http://www.mathworks.co.uk/matlabcentral/answers/43073-a-guide-to-tags
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Time Series Events에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!