Skip to content

as for code readable, I have a little suggestion #528

Open
@phpsmarter

Description

@phpsmarter

eg. lorenz

function lorenz!(du,u,p,t)
    σ,ρ,β = p
  
    du[1] = σ*(u[2]-u[1])
    du[2] = u[1]*(ρ-u[3]) - u[2]
    du[3] = u[1]*u[2] - β*u[3]
end

modify to :

function lorenz!(du,u,p,t)
    σ,ρ,β = p
    x,y,z = u
  
    du[1] = σ*(y-x)
    du[2] = x*(ρ-z) -y
    du[3] = x*y - β*z
end

better or worse?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions