VariableNames and TextscanFormats must be specified during construction

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

VariableNames and TextscanFormats must be specified during construction

Post by matlab1 »

VariableNames and TextscanFormats must be specified during construction
matlab1
Site Admin
Posts: 4797
Joined: Thu Dec 15, 2016 9:30 am
Contact:

Re: VariableNames and TextscanFormats must be specified during construction

Post by matlab1 »

Solution:



TabularTextDatastore properties describe the files associated with a TabularTextDatastore object. Specifically, the properties describe the format of the data in the files and control how the data should be read from the datastore. When you create a TabularTextDatastore object, the datastore function uses the first file in the Files property to determine the values of the properties. With the exception of the Files property, you can specify the value of TabularTextDatastore properties using name-value pair arguments when you create the datastore object. To view or modify a property after creating the object, use the dot notation:

ds = tabularTextDatastore('airlinesmall.csv');
ds.TreatAsMissing = 'NA';
ds.MissingValue = 0;



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 6 guests