function parameter includes h. I want plot title to include same h. how to do?
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
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
Antworten (1)
Star Strider
am 12 Mär. 2019
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))
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!