In LP or other kinds of programming, cvx + Matlab may get the lagrange multipliers with easy codes, but is there any commands for Gurobi to achieve things like this?
With Gurobi's Matlab API, the optimization call will return a single data instance that contains all results from that optimization, including the dual values: Matlab API
You would need to inspect this returned data object to find the values you are looking for.