フィルターのクリア

Fprintf question and application.

1 回表示 (過去 30 日間)
Hussain Hayat
Hussain Hayat 2015 年 7 月 14 日
コメント済み: Hussain Hayat 2015 年 7 月 15 日
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?

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2015 年 7 月 14 日
Write this, you will understand
fprintf( '%50sVIII\n', 'Henry' )
  3 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2015 年 7 月 15 日
編集済み: Azzi Abdelmalek 2015 年 7 月 15 日
%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!
Hussain Hayat
Hussain Hayat 2015 年 7 月 15 日
I cant figure out how this function works completely, I did check MATLAB help, hoping that this example can help clear it up.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEmbedded Coder Supported Hardware についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by