What is the difference between %d and %i?

조회 수: 90 (최근 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 CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by