Next: general, Previous: cw-weave-models, Up: Directory Index [Contents][Index]
Load data from a FITS (Flexible Image Transport System) file.
data = fitsread("results.fits"); # Load all data in "results.fits" data = fitsread("results.fits[table1]"); # Load only the table "table1" in "results.fits"
Makes the directory path dirs, including all parent directories. Returns the final directory in path.
dir0 = tempname(tempdir); mkpath(dir0, "a", "b", "c"); assert(isdir(fullfile(dir0, "a", "b", "c")));
Read a .ini style configuration file into a struct.
configuration file contents
configuration file
inifile = strcat(tempname(tempdir), ".ini"); inicfg = struct("sec1", struct("key1", 1.23, "key2", "hi"), "sec2", struct("key3", "there")); writeConfigFile(inifile, inicfg); inicfg2 = readConfigFile(inifile); assert(inicfg.sec1.key1, inicfg2.sec1.key1); assert(inicfg.sec1.key2, inicfg2.sec1.key2); assert(inicfg.sec2.key3, inicfg2.sec2.key3);
Write a .ini style configuration file from a struct.
configuration file
configuration file contents
inifile = strcat(tempname(tempdir), ".ini"); inicfg = struct("sec1", struct("key1", 1.23, "key2", "hi"), "sec2", struct("key3", "there")) writeConfigFile(inifile, inicfg);