CommentStyle must be a single character vector or a cell array of two character vectors

Post Reply
matlab1
Site Admin
Posts: 4797
Joined: Thu Dec 15, 2016 9:30 am
Contact:

CommentStyle must be a single character vector or a cell array of two character vectors

Post by matlab1 »

CommentStyle must be a single character vector or a cell array of two character vectors
matlab1
Site Admin
Posts: 4797
Joined: Thu Dec 15, 2016 9:30 am
Contact:

Re: CommentStyle must be a single character vector or a cell array of two character vectors

Post by matlab1 »

tabularTextDatastore
Datastore for tabular text filesexpand


Description
Use a TabularTextDatastore object to manage large collections of text files containing column-oriented or tabular data where the collection does not necessarily fit in memory. Tabular data is data that is arranged in a rectangular fashion with each row having the same number of entries. You can create a TabularTextDatastore object using the tabularTextDatastore function, specify its properties, and then import and process the data using object functions.





CommentStyle — Comment character
'' (default) | character vector | string scalar | two-element array
Comment character used to distinguish comments in the file, specified as character vector, string scalar, or two-element string or cell array.

If you specify a character vector or string scalar, then all following text on the same line are interpreted as a comment. For example, 'CommentStyle','/*' interprets all text after /* on the same line as a comment.

If you specify a two-element string vector or a two-element cell array containing character vectors, then all text between the two characters are interpreted as a comment. For example, 'CommentStyle',{'/*', '*/'} interprets all text between '/*' and '*/' as a comment.

When reading from a TabularTextDatastore, the read function checks for comments only at the start of each field, not within a field.

When you change the value of this property, the datastore function reevaluates the values of the TabularTextDatastore properties.

Example: 'CommentStyle',{'/*', '*/'}

Data Types: char | cell | string



For more information,
https://www.mathworks.com/help/matlab/ref/matlab.io.datastore.tabulartextdatastore.html
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests