Main Content

塔达斯塔尔

Datastore for checkpointing数组

描述

塔达斯塔尔物体用于重新创建来自二进制文件的数组编写为磁盘功能。You can use the object to recreate the original数组,或者您可以通过指定访问和管理数据塔达斯塔尔属性并使用对象函数。

创建

Create塔达斯塔尔objects using the数据存储功能。例如,tds = datastore(位置,“ type”,“ tall”)从指定的文件集合中创建数据存储地点

特性

展开全部

文件included in the datastore, resolved as a character vector, cell array of character vectors, string scalar, or string array, where each character vector or string is a full path to a file.

地点争论数据存储函数定义文件property when the datastore is created. The地点argument contains full paths to files on a local file system, a network file system, or a supported remote location such as Amazon S3™, Windows Azure®BLOB存储和HDFS™。有关更多信息,请参阅使用远程数据

这些文件必须是垫子文件或序列文件功能。

Example:[“ c:\ dir \ data \ file1.ext”;“ c:\ dir \ data \ file2.ext”]

Example:[“ s3://bucketname/path_to_files/your_file01.ext”;”

数据类型:char|cell|细绳

文件类型,指定为"mat"用于垫子或“ seq”用于序列文件。默认情况下,提供的位置中的文件类型确定文件类型

数据类型:char|细绳

Maximum number of data rows to read in a call to thereador预习functions, specified as a positive integer. When the数据存储函数创建a塔达斯塔尔,它确定并分配了最佳价值读取尺寸

替代文件系统根路径,指定为由名称值参数组成的"AlternateFileSystemRoots"以及字符串向量或单元格数组。利用"AlternateFileSystemRoots"when you create a datastore on a local machine, but need to access and process the data on another machine (possibly of a different operating system). Also, when processing data using the Parallel Computing Toolbox™ and theMATLAB®Parallel Server™,并且数据存储在您的本地计算机上,并具有在不同平台云或群集机上可用的数据的副本,您必须使用"AlternateFileSystemRoots"to associate the root paths.

  • 要关联一组彼此等效的根路径,请指定"AlternateFileSystemRoots"作为字符串向量。例如,

    [“ z:\ datasets”,“/mynetwork/dataSet”]

  • 要关联到数据存储的多组根路径,请指定"AlternateFileSystemRoots"as a cell array containing multiple rows where each row represents a set of equivalent root paths. Specify each row in the cell array as either a string vector or a cell array of character vectors. For example:

    • 指定"AlternateFileSystemRoots"as a cell array of string vectors.

      {[“ z:\ dataSets”,“/mynetwork/dataSets”]; ... [y:\ dataSets',“/mynetwork2/dataSets”,“ s:\ dataSets”]}

    • 或者,指定"AlternateFileSystemRoots"作为字符矢量的细胞阵列的细胞阵列。

      {{'Z:\datasets','/mynetwork/datasets'};... {'Y:\datasets', '/mynetwork2/datasets','S:\datasets'}}

这value of"AlternateFileSystemRoots"必须满足这些条件:

  • 包含一个或多个行,每行指定一组等效的根路径。

  • Each row specifies multiple root paths and each root path must contain at least two characters.

  • Root paths are unique and are not subfolders of one another.

  • 至少包含一个指向文件位置的根路径条目。

有关更多信息,请参阅设置用于处理不同机器或群集上的数据存储

Example:[“ z:\ datasets”,“/mynetwork/dataSet”]

数据类型:细绳|cell

对象功能

hasdata 确定数据是否可读取
数字 Number of datastore partitions
分割 Partition a datastore
预习 数据存储中的数据子集
read Read data in datastore
读取 在数据存储中读取所有数据
重置 将数据存储重置为初始状态
transform 变换数据存储
combine 组合来自多个数据存储的数据
可以分配 Determine whether datastore is partitionable
可观 确定数据存储是否可以改组

例子

全部收缩

利用塔达斯塔尔直接从磁盘上的文件重建高阵列的对象,而不是重新执行产生高阵列的所有命令。创建一个高阵列并将其保存到磁盘功能。检索array using数据存储然后将其转换回

创建一个简单的高高双。

t = tall(rand(500,1))
T = 500×1高双柱向量0.8147 0.9058 0.1270 0.9134 0.6324 0.0975 0.2785 0.2785 0.5469 :: ::

将结果保存到名为的新文件夹example_folder

地点= fullfile(matlabroot,“工具箱”,,,,“ matlab”,,,,“演示”,,,,“ folder1”);写(位置,t);
Writing tall data to folder H:\21\nhossain.Bdoc21b.Apr13\matlab\toolbox\matlab\demos\Folder1 Evaluating tall expression using the Local MATLAB Session: - Pass 1 of 1: Completed in 0.063 sec Evaluation completed in 0.16 sec

恢复array that was written to disk, first create a new datastore that references the same directory. Then convert the datastore into a大批。

tds = datastore(位置);T1 =高(TD)
T1 = M×1高双柱向量0.8147 0.9058 0.1270 0.9134 0.6324 0.0975 0.2785 0.2785 0.5469 ::

版本历史记录

在R2016b中引入