필터 지우기
필터 지우기

I need efficiently initialize a population of soldiers (particles) with random positions within feasible bounds in MATLAB?

조회 수: 2 (최근 30일)
I'm working on WSO for optimal placement of capacitor. How can you efficiently initialize a population of soldiers (particles) with random positions within feasible bounds in MATLAB?

채택된 답변

recent works
recent works 2023년 12월 31일
Use the rand function to generate random numbers within the specified limits for each decision variable.
Example, to create a 50x2 matrix of random capacitor locations between buses 2 and 33
soldier_positions = 2 + (32-2).*rand(50,2);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Problem-Based Optimization Setup에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by