I'm trying to write a program in Mathematica to import some data files. Here's the problematic bit,
This command gets a list of files in the working directory,
files = FileNames[''output*.dat'']
This works out how many files my C program has produced
l = Length[files]
The bit I'm having the problem with is here. The program plots fine, but, at the top of each output file are two headers that tell Mathematica how to label the axes on the plots. I want to delete these from the imported lists before I pass them to ListPlot, but Mathematica won't let me do delete operations in any programming statement, like DO or FOR.
For[i = 1, i <= l, i++, z = Import[ files[[i]]]; lab = z[]; Delete[z, 1];
ListPlot[z, AxesLabel -> lab]]
Is it just a problem with my code, or does Mathematica have some sort of protection mechanism?
Thanks in advance,