Create a datastore from the sample file, airlinesmall.csv
,
which contains tabular data.
Partition the datastore into three parts.
subds =
TabularTextDatastore with properties:
Files: {
' ...\matlab\toolbox\matlab\demos\airlinesmall.csv'
}
ReadVariableNames: true
VariableNames: {'Year', 'Month', 'DayofMonth' ... and 26 more}
Text Format Properties:
NumHeaderLines: 0
Delimiter: ','
RowDelimiter: '\r\n'
TreatAsMissing: ''
MissingValue: NaN
Advanced Text Format Properties:
TextscanFormats: {'%f', '%f', '%f' ... and 26 more}
ExponentCharacters: 'eEdD'
CommentStyle: ''
Whitespace: ' \b\t'
MultipleDelimitersAsOne: false
Properties that control the table returned by preview, read, readall:
SelectedVariableNames: {'Year', 'Month', 'DayofMonth' ... and 26 more}
SelectedFormats: {'%f', '%f', '%f' ... and 26 more}
ReadSize: 20000 rows
Create a datastore from the sample file, mapredout.mat
,
which is the output file of the mapreduce
function.
Get the default number of partitions for ds
.
Partition the datastore into the default number of partitions
and return the datastore corresponding to the first partition.
Read the data in subds
.
Create a datastore that contains three image files.
ds =
ImageDatastore with properties:
Files: {
' ...\matlab\toolbox\matlab\demos\street1.jpg';
' ...\matlab\toolbox\matlab\imagesci\peppers.png';
' ...\matlab\toolbox\matlab\imagesci\corn.tif'
}
ReadFcn: @readDatastoreImage
Partition the datastore by files and return the part corresponding
to the second file.
subds =
ImageDatastore with properties:
Files: {
' ...\matlab\toolbox\matlab\imagesci\peppers.png'
}
ReadFcn: @readDatastoreImage
subds
contains one file.
Create a datastore from the sample file, mapredout.mat
,
which is the output file of the mapreduce
function.
Partition the datastore into three parts on three workers
in a parallel pool.