Saving a text file

前端 未结 1 1182
一整个雨季
一整个雨季 2021-01-24 09:59

I want to save a matrix as .text with a variable filename. Currently I\'m saving my file using the function dlmwrite(name,matrix); This is only working with a pre-set filename.

相关标签:
1条回答
  • 2021-01-24 10:32

    You can use uiputfile to graphically get the file name. For example:

    [filename, pathname, filterindex] = uiputfile('', 'Select file');
    

    Then use dlmwrite to save a variable, say data, to that file:

    dlmwrite(fullfile(pathname, filename), data)
    
    0 讨论(0)
提交回复
热议问题