Info

此问题已关闭。 请重新打开它进行编辑或回答。

i want to convert python code in MATLAB

1 次查看(过去 30 天)
jazba hafeez
jazba hafeez 2022-3-8
关闭: John D'Errico 2022-3-8
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 个)

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by