Info
This question is closed. Reopen it to edit or answer.
i want to convert python code in MATLAB
1 view (last 30 days)
Show older comments
def somersault():
for i, monkey in enumerate(monkeys):
alfa = random.uniform(c, d)
somersault_pivot = [statistics.mean(
monkeys[row][col] for row in range(M)) for col in range(len(monkey))]
y = [x + alfa * (pj - x) for x, pj in zip(monkey, somersault_pivot)]
while not feasible_position(y, constraint1, constraint2):
alfa = random.uniform(c, d)
y = [x + alfa * (pj - x)
for x, pj in zip(monkey, somersault_pivot)]
monkeys[i] = y
0 Comments
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!