how to write and read file quickly?
1 回表示 (過去 30 日間)
古いコメントを表示
I have one data translation device of which I am getting data using 'getdata' function. now I have to save this data and once it saved I have to read it again and plot a graph.
I am getting data using following code
[d,t]=getdata(ai); // where d is data and t is time
data1=d(:,1);
data2=d(:,2);
I have to save this data very quickly and again read it and plot graph.
which method shall I use?? xslread and write or csvread and write or dlmread and write?
0 件のコメント
回答 (1 件)
Walter Roberson
2016 年 3 月 8 日
fwrite() the data to the file, and fread() it from the file.
Separately from that, when you are dealing with the file I/O in MATLAB, you might be able to use memmapfile(). An example of using that to communicate between sessions is http://www.mathworks.com/help/matlab/import_export/share-memory-between-applications.html
If you have two different MATLAB sessions that are using a file to communicate, you should consider instead using a shared memory segment; see http://www.mathworks.com/matlabcentral/fileexchange/28572-sharedmatrix
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!