??? Undefined function or variable - Matlab R2011a

1 view (last 30 days)
Hi!
I'll start by clarifying that I don't normally use Matlab. I work in a support role for several staff who do, but usually our support goes as far as making sure the software is installed and licensed correctly and then we haven't had many issues that have required us to seek out further advice until now.
We are using Matlab R2011a in the agency I work with and currently are not in a position to update. Although it is on the cards, we have a staffing & workload issue and the upgrade hasn't begun yet.
Recently (friday last week) a user has started to have issues with the "??? Undefined function or variable" error coming up when she tries to Compile + Run some Matlab files from a network drive.
The exact errors just seem to point to the name of the file we are trying to run. For example, when trying to run the file 'ampplot' we get the below error:
??? Undefined function or variable 'ampplot'.
Other users do not have any issues with the same files, and the software has been re-installed and user preferences reset (I think... If the preferences live in C:\Users\**user**\Appdata\Roaming\Mathworks folder) but the error keeps appearing.
I've read that sometimes Matlab can have issues trying to run a function if the file is using the same name but while the error points to the file name, there is no attempt to call any function with the same name from within the file as far as i can tell.
I've tried troubleshooting with the user in the following ways:
1. Remove user preferences and allow Matlab to create new preferences. 2. Re-install with same user preferences 3. Re-install and allow the uninstall process to clear user preferences
We have tried moving the files to another directory, and this appears to work but only sometimes. Eventually the same errors start to appear with the files in a new directory.
Unfortunately I'm out of ideas. Can anyone suggest further steps to troubleshoot this?
Thanks in advance :)

Answers (2)

Greg Heath
Greg Heath on 18 Mar 2014
lookfor ampplot
  1 Comment
Shane Nayler
Shane Nayler on 18 Mar 2014
Hi Greg,
Thanks for your suggestion. We've had a look through the file and it only appears in a commented section at the top of the file.
The comments are just an area that has been used to title the file.
There are no references to ampplot other than in the commented section at the top.

Sign in to comment.


Sean de Wolski
Sean de Wolski on 18 Mar 2014
Edited: Sean de Wolski on 18 Mar 2014
I've never heard of ampplot and I cannot find it with a full product install.
What does the following return on both the users who can use it and those can't?
which -all ampplot
Perhaps you just need to add the directory that contains it to the path of the user who can't use it now?
doc addpath
  1 Comment
Shane Nayler
Shane Nayler on 18 Mar 2014
Hi Sean,
Thank you for your assistance.
We've run the
which -all ampplot
command and it has returned the expected directory.
Based on this, we haven't tried the addpath, because it seems Matlab is looking in the right place for the file.
Would you still suggest we try the addpath anyway?
Do you have any other ideas for what could be happening? :)

Sign in to comment.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!