📅  最后修改于: 2022-03-11 15:01:04.779000             🧑  作者: Mango
%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, ...');