For writing formatted ascii output WE often write like fprintf(fid,'%5.3f %5.3f %5.3f %5.3f.. ',A).
Describe code that avoids repeating the format description, say 5 times. HOW DO I DO IT? THANKS.

Antworten (1)

Image Analyst
Image Analyst am 26 Okt. 2016

0 Stimmen

Just put it once:
fprintf(fid,'%5.3f ', A)

Kategorien

Mehr zu Simulink finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 26 Okt. 2016

Beantwortet:

am 26 Okt. 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by