【发布时间】:2017-01-12 08:50:55
【问题描述】:
我正在尝试使用以下命令将 csv 文件读入 Matlab
data=csvread('/econ/research/rd123/RAIS/Chuhang/data/final_samples/growth_regs_RandI_ALL.csv',1,0);
但是matlab产生了以下信息:
{使用 dlmread 时出错(第 138 行)文件和格式不匹配 细绳。从文件中读取“数字”字段时遇到问题(第 1 行,字段 数字 1) ==> "00000000000272",440,"65","13007",1995,6586,.1776316,-.1045213,.2821529,.0000105,.0002363,.0378644,.0078976\n
csvread 中的错误(第 47 行) m=dlmread(文件名, ',', r, c);
import_all_mfn 中的错误(第 13 行) data=csvread('/econ/research/rd123/RAIS/Chuhang/data/final_samples/growth_regs_RandI_ALL.csv',1,0);
有谁知道可能是什么问题?提前致谢!
-初航
【问题讨论】:
-
看起来您的数据在第 1 行字段 1 中包含带引号的字符串,而不是数字。
-
是的,这正是问题所在。谢谢!