How to pass parameter list to a function in Julia

后端 未结 5 756
名媛妹妹
名媛妹妹 2021-01-25 07:27

I am newbie in Julia language, and the tutorial is not very deep yet and I didn\'t understand what is the best way to pass a parameter list of a function. My function looks like

5条回答
  •  甜味超标
    2021-01-25 07:35

    this is a thing:

    function dxdt(x, a, b, c)
       a*x^2 + b*x + c
       end
    

    or the compact definition:

    dxdt(x, a, b, c) = a*x^2 + b*x + c
    

    see also argument passing in functions in the docs.

提交回复
热议问题