read a line frome file
1 次查看(过去 30 天)
显示 更早的评论
I have a data.m file with the following data:
1
2 3 5
3 3 2
8
9
i have use the following to load file and its work
load('data.m');
now i want to read just the 1st row, 3rd row and the 4th row
please help me, i need your help
2 个评论
Jan
2012-1-14
Please do not post three threads for one question. You can edit a question to improve it. I recommend to delete the older threads.
Walter Roberson
2012-1-14
Duplicate is at http://www.mathworks.com/matlabcentral/answers/26098-read-data-from-m-file
采纳的回答
Jan
2012-1-14
2 个评论
Walter Roberson
2012-1-14
http://www.mathworks.com/help/techdoc/ref/fopen.html
http://www.mathworks.com/help/techdoc/ref/fscanf.html
http://www.mathworks.com/help/techdoc/ref/fclose.html
Ingo
2012-1-14
In addition:
You could also use csv files (comma-separated) and use readcsv and so on. Those Matlab functions already come with the extra of only reading certain rows/columns/areas.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Low-Level File I/O 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!