photo

Tianyi Yu


Active since 2019

Followers: 0   Following: 0

Statistics

Feeds

View by

Question


How to 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)" ,...

5 years ago | 2 answers | 0

2

answers

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

5 years ago | 0

| accepted