How to log(append) the data to excel sheet continously when using 'while' loop?
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello! I am using MATLAB to read a real-time serial data. I am using a 'while' loop to iterate the loop continuously. Within the while loop I have a resultant matrix which stores the variables i require. Then I use 'xlswrite' command to store these values. But the problem is, for every iteration this file 'sampletest.xlsx' gets rewritten. I want the new values of every iteration to be stored in the same file i.e. they have to get appended below the previous set of values. How can I achieve this? Hoping to find some help.
while <condition>
.
.
.
filename = 'sampletest.xlsx';
D = [(vfl) (vfr) (vrl) (vrr) (temp) (tps) (delta) (time) (vv) (Ax) (s_rr) (s_rl)] %concatenated matrix
sheet = 1;
log_data = xlswrite(filename,D,sheet);
.
.
end
0 Kommentare
Antworten (1)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements 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!