Closed-Form And Robust Expressions For The Data-Driven Control Of Centralized And Distributed Systems