I need to write data to a .txt file in MATLAB. I know how to write strings (fprintf) or matrices (dlmwrite), but I need something that can do
fprintf
dlmwrite
You've got two dlmwrite() calls, the first on an empty matrix, and the second one is missing the 'delimiter' option. What happens if you add it to the second call?