MATLAB: ‘perimeter’ function giving error

MATLABperimeterpolyshape

I am getting an error when I run the example code for 'perimeter(polyin)'.
Here is the example code I open in matlab: openExample('matlab/PerimeterofPolygonExample')
I get the error: Function 'subsindex' is not defined for values of class 'polyshape'.
Anyone know why? Is there a toolbox I need to download to use this?

Best Answer

You've created a variable named perimeter. Rename or delete that variable.