MATLAB: Why am I seeing a bunch of characters when I open a m file

when i try to open any M file using matlab editor, i only see a bunch of characters. what am I doing wrong here. can anyone please advise.

Best Answer

If you open an M-file from a compiled application, the code is encrypted. They start like this then:
V1MCC4000MEC1000MCR1000x
L›û¿èÉìTg2ÞÖ FCr"ÝûN<Z¼—yz¹è6›å=ì³P…ÙµU“|¸ô*æYêö
pKì¦0‡ÝG7†_Þn´Äõ“ߢ$ÍPk'BÂëg=¿h·A{þŠ7±XÓ^•#8Vá¬\‚ˆ§¤=¤&reg;þ*[
...
The initial block defines, how the contents is stored, and you can recognize the file type.
This does not matter, because the source of compiled application is wanted to be concealed. Other M-files, like the ones in Matlab's toolbox should be written in clear text. Try to open:
edit std
But perhaps you have another problem. Remember that all that we know is that the names of your files end with ".m", but this is very few information. You can rename any file to have such an file extension. Please explain, where these files are coming from, and post their path and the first block of characters. Many binary file types can be recognized by the initial sequence.
Related Question