Info

This question is closed. Reopen it to edit or answer.

i want to convert python code in MATLAB

1 view (last 30 days)
jazba hafeez
jazba hafeez on 8 Mar 2022
Closed: John D'Errico on 8 Mar 2022
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

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!