This error is caused due to missing function or variable definition. The definition of ‘IBranchContent’ is missing. I ran the code on my machine and it worked for me. Check the definition in the following screenshot :
You can always use MATLAB Online which can be found on the top right in the example documentation page, to quickly run the example and learn more about the missing function or variable.