
How to write 2 didgits after decimal in text figure like given below
3 ビュー (過去 30 日間)
古いコメントを表示
how to print on a figure the text like
here p1 = 0.234567546485, k1 = 0.045677869
text(800,0.3,['\Delta = ' num2str(fprintf('%.2f',(k1*100))),newline,'S = ' num2str(fprintf('%.2f',(p1*100)))],...
'FontWeight','bold','FontSize',12);
I want o/p like


Can anyone please help!
0 件のコメント
採用された回答
madhan ravi
2019 年 1 月 7 日
編集済み: madhan ravi
2019 年 1 月 7 日
a=['\Delta = ',sprintf('%.2f\n',(k1*100)),...
'S = ',sprintf('%.2f',(p1*100))];
text(800,0.3,a,...
'FontWeight','bold','FontSize',12);

その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!