f



managing files&directories through m-file

Hi all!

simple but nasty problem(at least for me!)

i run several times a day the same simulation and i need to store the
plots i generate in this file in several different directories.

Then i wrote such a function, which is called in the main simulation
m-file:

function create_dir()

dirname = datestr(fix(clock));
mkdir(strrep(dirname,':','_'));

Still my routine generates the figures i need but i can't work out how
to move to 'dirname', or to create them directly in 'dirname'.

I tried this:

function create_dir()

h = figure;
dirname = datestr(fix(clock));
parentdirname = pwd;
mkdir(strrep(dirname,':','_'));
finaldir = strcat(parentdirname,'\',dirname);
hgsave(h,'alfa','-v6');
movefile('*.fig',finaldir,'f');

But it doesn't work...surely there's a smarter way to fix it, or a
working one!

Thanx all in advance for the (precious)support!!!

neurino
0
neurino (29)
10/7/2004 3:20:40 PM
comp.soft-sys.matlab 211266 articles. 23 followers. lunamoonmoon (257) is leader. Post Follow

0 Replies
475 Views

Similar Articles

[PageSpeed] 32

Reply: