Question : save mat file script in matlab directory
Answered by : breakable-booby-19mef31s9qhm
%get the directory of your input files:
pathname = fileparts('/input/file');
%use that when you save
matfile = fullfile(pathname, 'output.mat');
figfile = fullfile(pathname, 'output.fig');
save(matfile, ...');
saveas(figfile, ...');
Source : | Last Update : Thu, 09 Jul 20