フィルターのクリア

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