I know about MATLAB\'s format long, format short, eng ... and so on. But short and long will always display a predefined number of decimals, with
I don't know of a way to specify a global format of the type you want. sprintf('%15.4f', x) or num2str(x, '%15.4f') do what you're looking for, if you don't mind calling them explicitly each time.
sprintf('%15.4f', x)
num2str(x, '%15.4f')