Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
MatLab Question - Input as Plot Title?
I am inputting a specific parameter file into my MatLab program and then plotting the calculated data on a graph. Is there any way I can get the title of that graph to automatically put the name of the parameter file I inputted?
Thanks!
2 Answers
- 10 years agoFavorite Answer
n = 1.234;
title(sprintf('Plot with value v = %f', n))
% or
title(['Plot with value v = ', num2str(n)])
You can do this inside of a loop and use the counter or however you want to define it. If the value is a string you can use option one and do a %s then the variable. I have done this hundreds of times with a loop to label the problem numbers. Let me know if this doesn't work and I will go look at some old code. PS Matlabs website is amazing for ?s like these. : )
- Anonymous10 years ago
i dont know but on web search i found a similar question answered here adf.ly/2zqCE