Changing file path in a loop and save figures

N
neha · Nov 14, 2022 · 1.9K views
Question
I want to run a code where inside every folder i have a data file and save in each folder a .fig. Can anyone help me?  
Expert Answer
Profile picture of Neeta Dsouza
Neeta Dsouza PhD Expert
Answered Nov 20, 2025

Try this to indicate the entire path:

 

savefig(fullfile(thisDir,'DN.fig'))

 

Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!