Modify variables inside a for loop within a function

前端 未结 0 706
悲&欢浪女
悲&欢浪女 2020-12-24 08:46

In the following function

function foo(g)
    a = [g * sqrt(i) for i in 1:4]
    b = [g * i ^ 2 for i in 1:4]
    for j in [a, b]
        j /= sum(j)
                 


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题