Several options
writematrix(sol{1}, 'myData.dat'); % R2019a and later
writecell(sol, 'myData.dat'); % R2019a and later
dlmwrite('myData.dat', sol{1}); % earlier releases.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!