What is the difference between %d and %i?

30 ビュー (過去 30 日間)
Lisa Lee
Lisa Lee 2017 年 8 月 3 日
回答済み: Image Analyst 2017 年 8 月 3 日
I am wondering what the difference is between %d and %i. For fprintf, they are the same. If there is no difference at all, then why do we have both of them?

採用された回答

Image Analyst
Image Analyst 2017 年 8 月 3 日
There appears to be no difference according to the help. My guess is they allowed both to make it easy for people coming from other programming languages where they might have used one or the other of those letters in that other language.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by