Discussion Overview
The discussion revolves around the challenge of reading multiple .dat files to extract a specific data point (x120, y120, z120) and saving it into a new .dat file. Participants are exploring solutions primarily in MATLAB, with some suggestions for alternative scripting languages.
Discussion Character
- Technical explanation
- Debate/contested
- Mathematical reasoning
Main Points Raised
- One participant requests assistance in reading 1200 .dat files to extract a specific point and save it, asking for help in either Fortran or MATLAB.
- Another participant suggests using AWK or a similar scripting language, noting that it could be accomplished with a simple one-liner.
- A participant shares MATLAB code they wrote to read the files but encounters an error related to an invalid file identifier when using the textscan function.
- Concerns are raised about whitespace in filenames potentially causing issues, with a suggestion to rename files to remove spaces.
- Another participant points out that the format in the sprintf function is incorrect and advises checking the generated filenames to ensure they are valid.
- Suggestions are made to use the dir command in MATLAB to list the .dat files in the directory as a way to troubleshoot file access issues.
Areas of Agreement / Disagreement
Participants express differing opinions on the best approach to handle the file reading and error resolution, with no consensus reached on a single solution. The discussion remains unresolved regarding the optimal method to extract the desired data point.
Contextual Notes
Limitations include potential issues with file naming conventions, particularly concerning whitespace, and the need for further debugging of the provided MATLAB code. The discussion does not resolve the underlying causes of the errors encountered.