www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/CreateDatastoreforTextDataExample.m
%% Create Datastore for Text Data % Create a datastore associated with the sample file |airlinesmall.csv|. % This file contains airline data from the years 1987 through 2008. %% % % To manage the import of missing data in numeric columns, use the % |'TreatAsMissing'| name-value pair argument. In this example, specifying % the value |'NA'| for |'TreatAsMissing'|, replaces every instance of % |'NA'| with a |NaN| in the imported data. Where, |NaN| is the value % specified in the |'MissingValue'| property of the datastore. ds = datastore('airlinesmall.csv', ... 'TreatAsMissing','NA') %% % |datastore| creates a |TabularTextDatastore|.