MATLAB: Unable to change default printer using printopt

accessdeniededitMATLABprintprintingprintopt

Attempting to edit the "printopt.m" file results in an "Access denied" dialog. How can I edit this file on Windows 10?

Best Answer

Files installed on the default MATLAB path by MATLAB may require permissions to access. Access to this file requires administrator permissions. Try running MATLAB as admin and then editing the function.
 
Alternatively you could delete the "printopt.M" file from the default location and move it elsewhere. If using this method, be sure to add the new file to the MATLAB path. More information about adding files to the MATLAB path can be found at: