readMM_2D

版本 1.0.0.0 (2.0 KB) 作者: DS
Read 2-D matrix saved with Mathematica 'Put' command.
1.8K 次下载
更新时间 2008/12/1

查看许可证

READMM_2D(file,nrows) reads data from the full path+filename specified by 'file' and parses the data into the number of rows specified by 'nrows'.

If the number of rows is specified the function uses TXT2MAT to read a Mathematica formatted 2D data array. If number of rows is not specified, or if TXT2MAT is not available, the function reads the file with TEXTREAD and automatically determines the number of rows and columns for the input data.

Inputs:
file -- string variable; fully specified filename
nrows -- numeric scalar; number of rows in data file
flagstr -- 'fast' specifies TXT2MAT algorithm (default)
'slow' specifies TEXTREAD algorithm

Example:
numrows = 1248;
myfile = 'C:\somefile.txt';
A = readMM_2D(myfile,numrows);

ans = <1248x1248 double>

Please note: A separate file exchange submission (TXT2MAT) must be installed to take advantage of the 'fast' algorithm in this submission.

引用格式

DS (2024). readMM_2D (https://www.mathworks.com/matlabcentral/fileexchange/22283-readmm_2d), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R14SP2
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Data Import and Analysis 的更多信息
致谢

参考作品: txt2mat

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0