필터 지우기
필터 지우기

meaning of f in fprintf function

조회 수: 17 (최근 30일)
Spaceman
Spaceman 2024년 3월 20일
댓글: Spaceman 2024년 3월 21일
So this is just a general question, as I familiarize myself with the fprintf and all other glorious functions...
When I use the /f or form feed as it's called, what's that actually doing? What does 'form feed' mean?
Also does anyone know why it's 'fprintf' and not just 'print'?
Thanks in advance!

채택된 답변

Chunru
Chunru 2024년 3월 20일
In old days, the command \f is used to make a printer to move to beginning of next pages.
fprintf or print or printf are used by different programming languages for the similar (but may be different) purpose. The begining "f" means file print. The ending "f" means the formatted print.
  댓글 수: 8
Stephen23
Stephen23 2024년 3월 20일
편집: Stephen23 2024년 3월 20일
"I wonder why pi is a special case here"
PI is not a special case here.
PI is just a convenient binary floating point value that I used to demonstrate the effect of different formatting operators with. Forget about PI, you can pick any other binary floating point values with fractional part.
Spaceman
Spaceman 2024년 3월 21일
What would be another example of another binary floating point value? i^i or 0.20788?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by