Effacer les filtres
Effacer les filtres

Saving Table in Excel while in loop

2 vues (au cours des 30 derniers jours)
Hashvi Sai
Hashvi Sai le 28 Juil 2021
Modifié(e) : KSSV le 28 Juil 2021
Hi All
Im running a program pertaining to EEG data. I have a table with one row and while the loop is running i want the output to be saves in excel. i used the following code.
filename = 'testdata.xls'
for n=1:2
AllMI(1:1,:)
writetable(AllMI,'testdata.xls','Sheet',1,'Range', ['A' num2str(n)],'WriteVariableNames',false)
end
the problem is that both the rows are showing the same output.
Please help me with this.

Réponse acceptée

KSSV
KSSV le 28 Juil 2021
Modifié(e) : KSSV le 28 Juil 2021
Loop is not needed, you can striaght away write the matrix into excel.
writematrix(AllMI,'test.xlsx');

Plus de réponses (0)

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by