MATLAB: Save data in a special folder save data i a folder i used this dlmwrite('phase.txt',phase) to save the phase in a txt file. how could i tell matlab to save this data in a spacial folder. for exemple C:\A\b\data thank you! Best Answer Instead of 'phase.txt' use the full file-namedlmwrite('C:\A\b\data\phase.txt',phase) Related SolutionsMATLAB: How to give an option to user of where to save the generated file Just use fullfile like this, each time you call any function that reads/writes files:dlmwrite(fullfile(SaveDir,'PRM.txt') ,...)https://www.mathworks.com/help/matlab/matlab_env/specify-file-names.html MATLAB: How to use uigetfile to open subfolder’s file. [file,filepath] = uigetfile('*.txt');if isempty(file); return; end %user cancelfullname = fullfile(filepath, file);WISETEST = fopen( fullname, 'rt');out = textscan(WISETEST, '%s', 'Delimiter',{' '});fclose(WISETEST);aa = out{1}(1:end)'; Related QuestionText file has no space between elements – FilenameCreate .txt file and open dialog for saving-pathWrite Data to .txt or .csv fileSaving textfiles in a other folderHow to make an output text file in matlab. Explain by an example pleaseHow to save a file into another folder by using uiputfile
Best Answer