Import data from .csv files and use them as the input matrixes
3 ビュー (過去 30 日間)
古いコメントを表示
Hello everybody,
I have several .csv files(always a file with just one worksheet) containing the input data. What I'd like to do is to take such a file and import certain number of rows (over the all columns, however the number of columns is fixed).
Let say I'd like to receive Matrix1 from "file.csv" with dimension (220 000:265 000, 2:400). Anybody experienced with that? Thank you. Best regards, Vasek
0 件のコメント
回答 (1 件)
William
2012 年 3 月 23 日
use the csvread() command
type
help csvread
2 件のコメント
Eric
2012 年 3 月 23 日
In your question you state that you want to read all columns, yet you're telling the code to skip the first four. You should use
a = csvread('Velocity.csv', 4, 0);
to read in all columns but skip the first four rows.
-Eric
参考
カテゴリ
Help Center および File Exchange で Data Import from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!