What is the difference between %d and %i?

90 Ansichten (letzte 30 Tage)
Lisa Lee
Lisa Lee am 3 Aug. 2017
Beantwortet: Image Analyst am 3 Aug. 2017
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?

Akzeptierte Antwort

Image Analyst
Image Analyst am 3 Aug. 2017
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.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by