I was getting the same error and beacuse I was using the documentation link of other release. So can you make sure that you are using the documentation link of the same release of the MATLAB you have installed in your machine.
To find the documenation link for your release, refer to the following steps:
Best Answer