import multi type data in MATLAB

1 次查看(过去 30 天)
How I can import a text file in MATLAB including 256 columns: first column is string and other columns are numeric data.

采纳的回答

Gerd
Gerd 2011-6-29
Hi Sarah,
depending on your specific file you can use
fid= fopen('File.txt');
textscan(fid,'%s%f.....');
fclose(fid);
Gerd
  6 个评论
Jan
Jan 2011-6-29
Data = textscan(fid,['%s' repmat('%f',1,255)]);
Then Data is a cell, which contains the different columns as elements. See "help textscan".

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Large Files and Big Data 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by