matlab.io.datastore.FileWritable.write - Write block of data - MATLAB (original) (raw)
Class: matlab.io.datastore.FileWritable
Namespace: matlab.io.datastore
Syntax
tf = write(ds,data,info,outputFormat) tf = write(ds,data,info,outputFormat,varargin)
Description
tf = write([ds](#d126e521353),[data](#mw%5Fed2d40d6-be81-4e99-971b-eadc52a7eeb7),[info](#mw%5F7fbda58f-9a18-4840-ae25-a44eaefbe18e),[outputFormat](#mw%5F856c668d-406a-47ec-817e-52a1bb182dc1))
writes a chunk of data from the datastore and returns a value of logical 1
(true
) if the operation is successful.
If your custom datastore subclasses from matlab.io.datastore.FileWritable
, then it inherits a write
method that is capable of writing data for known datastore formats. However, if your custom datastore works with custom data formats, then you must implement your own write
method in the subclass. This method must be capable of writing data in any format listed in theSupportedOutputFormats
property of the class.
tf = write([ds](#d126e521353),[data](#mw%5Fed2d40d6-be81-4e99-971b-eadc52a7eeb7),[info](#mw%5F7fbda58f-9a18-4840-ae25-a44eaefbe18e),[outputFormat](#mw%5F856c668d-406a-47ec-817e-52a1bb182dc1),[varargin](#mw%5F96c4f462-5be4-4e00-aa3c-078d605ffe64))
also specifies one or more additional input arguments, which are passed to thewrite
method as a varargin
cell array.
Input Arguments
Block of data from read
, specified as a table or array depending on the type of datastore.
Information about data from read
, specified as a structure array or cell array depending on the type of datastore.
Output format, specified as a character vector or string scalar.
Variable length input, specified as separate input arguments of any type. Thewrite
method has four required inputs, and any additional inputs are passed to the method as a cell array. (See varargin for an explanation.) You can use this functionality to pass name-value pairs, optional flags, or parameters for use in the body of thewrite
method.
Version History
Introduced in R2020a