Info
此问题已关闭。 请重新打开它进行编辑或回答。
i want to convert python code in MATLAB
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!