which is the unknown variable? If it is w, and it is the function of k, you can spread it in the main equation and solve based on K using solve command or fsolve command. I think if you search these two commands on the net, you can find the solution for your equation to how to write and solve it for which variable.