Tag Info

New answers tagged


Here is a way to do what you want in one go. If you put your file names in a list named e.g. files, then the following gives you a list of lists, where each sub-list gives you the "T" value paired with the average of the corresponding "tts" value: getData[files_?(VectorQ[#, StringQ] &)] := Module[{str = ReadList[#, String] & /@ files // Flatten}, ...


Here's how I'd do it... Grab all the file names you want from a directory: files = FileNames["*.txt", "directory_here"]; Then apply a function to grab those values... grabdata[filepath_] := Module[{text = Import[filepath, "Table"]}, Thread[Cases[text, {#, num_} :> ToExpression[num]] & /@ {"T=", "tts="}]] grabdata/@files {{1, ...

Top 50 recent answers are included