Fprintf question and application.
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hussain Hayat
am 14 Jul. 2015
Kommentiert: Hussain Hayat
am 15 Jul. 2015
fprintf( '%7sVIII\n', 'Henry' )
fprintf( '%1sVIII\n', 'Henry' )
I can't understand the difference between the two. They have the same output. How does the field size value effect the fprintf?
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 14 Jul. 2015
Write this, you will understand
fprintf( '%50sVIII\n', 'Henry' )
3 Kommentare
Azzi Abdelmalek
am 15 Jul. 2015
Bearbeitet: Azzi Abdelmalek
am 15 Jul. 2015
%50s, will be replaced by a string 'henry' with length equal to 50 characters, that's why you 45 blanks and the five character of 'Henry'.
VIII? because you add it!
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Compiler SDK finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!