robotarium / robotarium-matlab-simulator

MATLAB simulator for the Robotarium!
MIT License
95 stars 53 forks source link

Error Reference Field of non-structure array. #4

Closed zmk5 closed 7 years ago

zmk5 commented 8 years ago

Running any example of the code raises the following error code on a machine running MATLAB R2014a.

Attempt to reference field of non-structure array.

Error in Robotarium/drawRobots (line 284)
            previousFigureNumber = gcf_.Number;

Error in Robotarium/step (line 226)
            this.drawRobots();

After running the code on release version R2016b, the code runs flawlessly. I believe the issue stems from MATLAB changing the way handles were created. I am looking through MATLAB documentation now to see at what version release this change occurred. If this is the case, the simulator may need to have a minimum MATLAB version requirement.

zmk5 commented 8 years ago

I figured out the issue. According to MATLAB's release notes for version R2014b, Mathworks "improved infrastructure based on MATLAB objects." This change made handles into multi-type objects instead of numeric handles, and this change allowed the use of dot notation.

Therefore, I would suggest adding a minimum version requirement to the README. Specifically, a minimum version of R2014b.

pglotfel commented 7 years ago

Sorry for the late reply -- I somehow lost track of this issue! I'll make sure that I add a line to the README.