function parameter includes h. I want plot title to include same h. how to do?
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
Hello,
function parameter includes h. I want plot title to include same h. how to do?
function G=graphit(X,Y,ye,h)
plot(X,Y,'-');
grid
title([ 'Approximate and Exact Solution @h= .', num2str(h)])
Thanks.
MM
0 个评论
回答(1 个)
Star Strider
2019-3-12
I have no idea what ‘h’ is, although I assume it’s a number.
Try this:
title(sprintf('Approximate and Exact Solution @h= %.3f.', h))
0 个评论
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!