Info
此问题已关闭。 请重新打开它进行编辑或回答。
how could i print '%' in matlab? using fprintf
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
Wayne King
2013-10-1
fprintf('%d is my age, i got %d %%in my test\n',19,100)
1 个评论
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!