MATLAB: How to reuse the same format

reuse the same format

For example, this code has nine "%7.0f" and one "%5.0f". Is there any way I can simplify this code, like "repmat('%7.0f' , 9)" , but still have the "defaults->" in the front?
fprintf('defaults-> %5.0f%7.0f%7.0f%7.0f%7.0f%7.0f%7.0f%7.0f%7.0f%7.0f\n' , header')

Best Answer

OK i think i solved this problem already:
fmt = ['# defaults-> %5.0f',repmat('%7.0f',1,8),'%7.0f\n',];
fprintf(fmt,header);