Set of Matlab scripts and functions for designing and optimising SRG