can't do a simple csvread for some reason
显示 更早的评论
I'm just trying to do a csvread and I can't seem to get it working. I opened a text edit file (mac) and put:
1,2,3, 4,5,6, 7,8,9
Then saved it as 'csvtest'. Then I renamed the file in the browser window, changing the .rtf to .csv.
I then put that file in my MATLAB folder and in matlab I typed: -
M = csvread('csvtest.csv');
I got this error: -
Error in ==> Ass_2_data_A at 1
M = csvread('csvtest.csv');
Not sure what's going wrong
3 个评论
Walter Roberson
2012-12-12
It just said "Error" and didn't say what the error was??
Tom
2012-12-12
Mark Hayworth
2012-12-12
You probably have something else in there, like a blank line, a header line, or something that's not a line with 9 numbers on it.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Text Data Preparation 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!