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!