A SystemC/Matlab co-simulation tool for networked control systems