Land Allocation, with simulated annealing

How to go about converting insturctions on a flow chart to matlab?
For example I have a matrix
M=zeros(10);%
k = randperm(100);
M(k(1:57))=1;
M(k(58:86))=2;
M(k(87:100))=3;
M=
and I have a flow chart that says for L(m) iterations do:
=>Initial start situation costs(0)=>cell change

 채택된 답변

Walter Roberson
Walter Roberson 2013년 12월 17일

0 개 추천

"initialize" correspond to assignment.
Doing something for L(m) iterations corresponds to using a "for" loop,
for P = 1 : L(m)
... do the thing here
end

댓글 수: 1

Eric
Eric 2013년 12월 17일
Can you pleas help me a little bit more? o.k so I have this matrix array that contains certain percent's of integers 1,2 and 3. And with this flow diagram I have to switch them accordingly so they lower the total cost of the algorithm. Each cell(numerical integer) has a specific cost to it and I need to arrange them in a way that minimizes cost and maximizes land allocation.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

질문:

2013년 12월 17일

댓글:

2013년 12월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by