I'd like to be able to apply this function loads,plots and saves figure data from a text file, to every file in a directory, such that when I type FunctionName(some directory), the function forks…
this is my code:
function plot;files = dir('*.txt');for i=1:length(files)data = load(files(i).name);filename=[files(i).name];plot(data);saveas(h,filename,'fig');close; endend
Best Answer