There is no official release for HEVC/H.265 codec in MATLAB because HEVC is not a royalty-free software and it is the reason that the tech Giants make an alternative video coding without any licensing fee. Therefore, HEVC is currently used mostly in scientific literature nowadays.
However, you can encode/decode YUV format video data in HEVC using HM reference software which is available in this link. To encode, you need Visual Studio installed on your Windows machine. Firstly, open your command prompt and type:
msbuild /p:Configuration=Release HM_vc2015.sln
After building the project, you can find some files in /bin folder. Then, you should change your current directory to /bin folder using cd command and type:
TAppEncoderStatic.exe -c your_config_file.cfg -i your_video_data.yuv
Hence, str.bin file will be created in /bin folder which can be renamed using your_config_file.cfg or command-line options which is thoroughly explained in the software manual. Also, you can find good config files in the /cfg folder. To decode the str.bin just type:
TAppDecoderStatic.exe -b str.bin -o dec.yuv
Note that dec.yuv is the decoded output video data in the decoder. Also, you can see the decoded and original video sequence using a YUV viewer. Moreover, you can find a good dataset here.