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

nästan 5 år 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);

nästan 5 år ago | 0

| accepted