Data Acquisition (DAQ) and Control from Microstar Laboratories

Knowledge Base: Installation

Q10108 Commands fail under MATLAB release R2011b

Tags: Help, DAPtools for MATLAB, R2011b, example applications

Applies to: Windows 7, DAPtools for MATLAB v5.00, MATLAB v7.13 (R2011b)

I just upgraded my version of MATLAB to the R2011b release (September 2011) from the R2011a release (April 2011). I use a variation of the INIT command, based on the INIT example in your DAPtools for MATLAB software. After the upgrade, neither of these commands work. MATLAB complains that it cannot find a "case-sensitive match" for INIT — did I perhaps want INIT? Well, yes obviously. When I type HELP INIT in the MATLAB command window, MATLAB has no trouble finding the command to read its help text. What is going on?

For reasons that may never be understood, Mathworks decided to make MATHCAD command names case-sensitive in 2009, and now they have changed their minds about what this means. This is awkward at best, because Windows 7 file system services, as in past versions of Windows, do not distinguish between a file stored with name init.m or with name INIT.M. MATLAB must examine each file name that it gets and diagnose/create error conditions. Previously, if you provided an M-file INIT.M, and invoked it with a command INIT, MATLAB would verify that both were upper case and therefore matched. As of the R2011b release, MATLAB now insists that INIT.M is not good enough. To be recognized for execution, the command file must have the name INIT.m (notice the lower case file extension).

Until a new DAPtools for MATLAB release is available, you can manually patch this problem by:

  • Find the scripts mentioned in the DAPtools for MATLAB manual, and any of your own scripts that have upper-case names and file extensions. Change their names and extensions to lower case. (Be careful, you might not get the results you expected. For example, as you attempt to change a name from INIT.M to init.m using Windows Explorer, you are likely to get init.m.M with the additional file extension hidden. You might need to make your changes with a third- party file manager utility or in a command window using the RENAME (REN) command.)

  • In your software, change all of your references to the modified commands to use the new lower case names.

Or another alternative is to use a conversion batch file [1] that will move the example files into the local documents work area that MATLAB set up, changing the file names as it goes. See the references section for a link to this file.



[1] Using the following link, let your browser save a copy of the matxcpy.txt file in your documents area. Change the file extension from .txt to .bat. Read the notes at the top of the file about how to prepare and run it.

[2] The example scripts are described in DAPtools for MATLAB Manual.