Skip until import data
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
0 votes
Share a link to this question
Accepted Answer
0 votes
Share a link to this answer
- learn to use Matlab
- the data file consists of consecutive blocks of headers and data
- a data block is a number of consecutive rows containing an equal number of "numerical strings"
- a header block is a number of consecutive rows, which do not belong to a data block
- cssm, main function
- getblocks, subfunction
- understand the code
- write comments
15 Comments
Share a link to this comment
Share a link to this comment
- Try to use the markup features. That makes the text so much easier to read.
- You need to carefully read the help on STRCMP, STRFIND, and TEXTSCAN format specifier
- What rule should be used to decide where the "headers at the top" ends?
- "preserve" does that mean store in a separate variable?
- How shall "midfile headers" be identified?
Share a link to this comment
Share a link to this comment
Share a link to this comment
- the first block of data contains three columns
- the second block of data contains four columns
- the lines "1" and " 0.456 0.456 456" belong to the middle header(?)
Share a link to this comment
Share a link to this comment
- learn to use Matlab
- present these specific data in a diagram. If so, clean-up the file interactively with an editor and read with IMPORTDATA
- develop a code to read data files, to which this is an example. If so, i) one need to better specify what kind of lines may occur in the files, ii) the code must be easy to maintain, i.e. modify when new files present unexpected features, iii) does the size and number of files make performance an issue
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
Share a link to this comment
More Answers (0)
Categories
Find more on Matrices and Arrays in Help Center and File Exchange
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!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)