You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
How do I split a sing column .txt file by line?
-
-
Direct link to this question
https://www.mathworks.com/matlabcentral/answers/477993-how-do-i-split-a-sing-column-txt-file-by-line
-
-
Direct link to this question
https://www.mathworks.com/matlabcentral/answers/477993-how-do-i-split-a-sing-column-txt-file-by-line
4 Comments
Accepted Answer
29 Comments
- Write function/s instead of one script.
- Provide input parameters in one structure or as input arguments, rather than using (awful untestable inconvenient annoying) input.
- Use fullfile instead of concatenating strings to build paths.
- load into an output variable, rather than directly into the workspace.
- Align the code consistently.
- It is very unikely that you need to call clear anywhere.
More Answers (1)
5 Comments

See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)