How the results are stored in a .xlsx file?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
stelios loizidis
il 21 Ago 2020
Commentato: stelios loizidis
il 24 Ago 2020
Hello,
I have the following problem: I want to calculate the RMSE. More specifically I run the algorithm five times and then add the resulting results and divide by five to calculate the average RMSE((RMSE1+RMSE2+RMSE3+RMSE4+RMSE5)/5). I use the command writecell but only the last value of the error is saved the rest is lost. How to save the error every time I run the algorithm ? Below I attach a part of the code.
Your help is important !!!
results = {DA,RMSE};
writecell(results,'results.xlsx')
1 Commento
Rik
il 21 Ago 2020
If you call this code every iteration, writecell will overwrite the file every time, just like you tell it to.
Risposta accettata
Utkarsh Belwal
il 24 Ago 2020
According to me during every iteration the writecell function is overwriting the previous results, that's why you are getting only last value saved. Use the function as shown below to append at the bottom for every iteration,
writecell(results , 'results.xlsx' , 'WriteMode' , 'append');
DISCLAIMER: These are my own views and in no way depict those of MathWorks.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Matrices and Arrays in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!