Writing into excel sheet from matlab
2 次查看(过去 30 天)
显示 更早的评论
I would like to write a matrix (1xn ) generated during each iteration of for loop into an excel sheet. during the first iteration the matrix should be entered into row 1, second iteration should update row2 and so on... using writematrix function in matlab. Please help me with a solution.
2 个评论
Dyuman Joshi
2023-10-11
Store the values in an array and use writematrix.
What seems to be the problem?
回答(2 个)
Binaya
2023-10-11
Hi
You can directly use "writematrix" or use convert the matrix into a table and use "writetable" functions to write into an excel sheet.
Regards
Binaya
0 个评论
KSSV
2023-10-11
N = 10 ;
iwant = zeros(N,1) ;
for i = 1:N
iwant(i) = i ;
end
T = table(iwant) ;
writetable(T,'Test.xlsx')
1 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!