필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

how could i print '%' in matlab? using fprintf

조회 수: 2 (최근 30일)
Jaybee
Jaybee 2013년 10월 1일
마감: MATLAB Answer Bot 2021년 8월 20일
code:
fprintf('%d is my age, i got %d % in my test\n',19,100)
desired output: 19 is my age, i got 100 % in my test
so the problem is that i cant print the '%' character, how could I do that?
thanks in advance! :D

답변 (1개)

Wayne King
Wayne King 2013년 10월 1일
fprintf('%d is my age, i got %d %%in my test\n',19,100)
  댓글 수: 1
Jan
Jan 2013년 10월 1일
@Jaybee: You can find the answer by reading the documentation: doc fprintf, see the section "formatSpec".

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by