Skip to content

Instantly share code, notes, and snippets.

@HereChen
Last active August 29, 2015 14:01
Show Gist options
  • Save HereChen/cd7843f001452c90dafa to your computer and use it in GitHub Desktop.
Save HereChen/cd7843f001452c90dafa to your computer and use it in GitHub Desktop.
matlab: associate .m with matlab
% Run matlab as administrator
% solve the problem opening a new matlab after double click m-file.
cwd = pwd;
cd([matlabroot '\toolbox\matlab\winfun\private']);
fileassoc('add','.m') ;
cd(cwd);
disp('Changed Windows file association. M-files are now associated with MATLAB.');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment