2015.12.08
之前有一陣蠻困擾的,因為Matlab灌完之後點開存檔的程式碼,都不能直接點開,目前已經找到解決辦法了,怕忘記紀錄一下。
--------------------------------------------------------------------------
commandwindow;
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. Congratulations!')
-------------------------------------------------------------------------
如果發現有錯誤訊息如下
--------------------------------------------------------------------------
??? Error using ==> fileassoc
No permissions to modify the registry.
-------------------------------------------------------------------------
代表沒有打開管理員權限,解決方法:
關閉原本MATLAB,(滑鼠右鍵)使用管理員身分執行,再重複1~2點動作即可。