|
From: Walter Roberson on 6 May 2008 12:11 In article <fvpt4n$om8$1(a)fred.mathworks.com>, carlos lopez <clv2clv_00000000_(a)adinet.com.uy> wrote: >"Vy Lam" <vlam(a)removethis.mcw.edu> wrote in message ><fvppti$qet$1(a)fred.mathworks.com>... >> My other need is to generate and save plots without them >> displayed on the monitor. >You can issue something like: >h=figure(gcf+1);set(h,'visible','off') >and then plot what you want. "gcf+1" attempts to create a >new figure; this will require some extra caution because you >(for example) are working within figure 3, but if figure 4 >already exists then the plots will be superimposed and/or >affected by your further work. You can avoid the problem about accidental duplication of figure numbers, and condense everything into a single statement: h = figure('visible','off','position',[1000 1000 560 420]); -- "There's no term to the work of a scientist." -- Walter Reisch
From: Vy Lam on 7 May 2008 09:15 Thank you Walter, for error(). As for Peter's code, I had to change it to this to get the desired effect. I basically needed a list of the folders to revisit/analyze. So, hopefully, it will help others who want the same thing: function l = recursive_dir(fname) global l d = dir(fname); for i = 1:length(d) if(strcmp(d(i).name, '.') || strcmp(d(i).name, '..')) continue; end newname = fullfile(fname, d(i).name); l=[l; newname]; if(d(i).isdir) recursive_dir(newname); end end end The main 'calling' function needs to have global l and fname (parent directory) defined... then l will give a list of all the directories (including the parent). Again, thank you all!
First
|
Prev
|
Pages: 1 2 Prev: How to find optimal p and q in ARMA Next: How to identify a Stateflow with get_param? |