how to write and read file quickly?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Walter Roberson
am 8 Mär. 2016
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 Kommentare
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!