Is it possible to write a simple function that takes some arguments and plots a graph? As I have written a simple function to automatically plot graphs for me but they wont generate when I call the function.
function = plot_graphs(x, y, n)
% Some data manipulation here - excluded for simplicity %
plot(x, y) title(' Figure n')
When I run this function it wont plot my graph. If I return arguments and call the plot in the original script that is plotting the function then it works. But I don't want to generate code by hand for 50 plots, I wish to call a function each time to make the scripting compact.