MATLAB: Plotting a figure with a variable as title

plotting figure

Hi, i want to plot a graph and the title of that graph should be equal to the variable mx1. how can i implement that?

Best Answer

Try something like this
caption = sprintf('The result for this graph is %.3f', mx1);
title(caption, 'FontSize', 30);