readmatrix
Create matrix array from file.
Syntax
M = readmatrix(filename)
M = readmatrix(filename, opts)
M = readmatrix(filename, opts, 'OutputType', type)
Input argument
filename - a string: an existing filename source.
opts - DelimitedTextImportOptions object
type - a string: 'double', 'single', 'char', 'string', 'int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'uint64'.
Output argument
M - a matrix.
Description
M = readmatrix(filename) creates a matrix array by importing column-oriented data from a text or spreadsheet file.
M = readmatrix(filename, opts) creates a matrix array using the settings defined in the opts import options object. The import options object allows you to customize how readmatrix interprets the file, offering greater control, improved performance, and the ability to reuse the configuration compared to the default syntax.
Examples
See also
writematrix, detectImportOptions, writetable, readtable, fileread.
History
1.10.0
initial version
Author
Allan CORNET
Last updated