How to edit MATLAB file kmeans.m?
1 次查看（过去 30 天）
I want to edit kmeans.m but it does not allow me to make any changes. I tried 'fileattrib' to make it writable file by
but even this does not work. I also tried to give the full path as follows:
Error using fileattrib
Operation not permitted
I will appreciate any advise.
the cyclist 2016-8-8
I would strongly advise against directly editing a read-only MATLAB file.
Instead copy it to your own directory, and edit your own file ...
copyfile /Applications/MATLAB_R2016b.app/toolbox/stats/stats/kmeans.m ./my_kmeans.m
It will still be read-only, but after make changes and try to save, you will be given an option to overwrite.