Clear Filters
Clear Filters

Error occurred while evaluating listener callback.

5 views (last 30 days)
The last week I changed Step Opts, and, now I'm having some trouble and errors while I use tf functions. So, for example, when I run this code:
step(tf(1,[1 1]))
Command Window shows this:
Unrecognized function or variable 'td'.
Error in roots (line 2)
F(1) = -x(1)+(2*pi())/(td*sqrt(1-(x(2))^2))
Error in ltipack.tfdata/pole (line 19)
p = roots(D.den{1});
Error in resppack.ltisource/isstable (line 18)
p = pole(D,'fast');
Error in resppack.ltisource/getFinalValue (line 13)
Stable = isstable(this,ModelIndex); % Note: will update DC gain value
Error in resppack.TimeFinalValueData/update (line 14)
cd.FinalValue = real(getFinalValue(r.DataSrc,find(r.Data==cd.Parent),r.Context));
Error in wavepack.waveform/addchar>LocalUpdateData (line 62)
Error in wavepack.wavechar/draw (line 12)
Error in wavepack.waveform/draw (line 48)
Error in wrfc.plot/draw (line 17)
Error in wrfc.plot/init_listeners>LocalRefreshPlot (line 79)
Warning: Error occurred while evaluating listener callback.
> In DynamicSystem/stepplot (line 131)
In DynamicSystem/step (line 92)
As you can see there is a lot of warnings and errors.
So...the thing is that it only happens when I decide to use Matlab Online, if I run the code on a friend's account it works perfect.
I would like to know why I am having this problem and how can I reset Matlab Online...

Answers (1)

Prateekshya on 29 Dec 2023
Hi Ana,
The error message you are encountering suggests that there might be a problem with your MATLAB environment, particularly with a custom script or function that is conflicting with MATLAB's built-in functions. The error message mentions an unrecognized variable "td", which should not be part of the regular "tf" or "step" function calls.
Here are some steps you can take to troubleshoot and potentially resolve this issue:
  • Clear your workspace and ensure that there are no custom scripts or functions in your current directory or MATLAB path that might be shadowing the built-in functions.
clear all;
close all;
restoredefaultpath; % Restore the original MATLAB search path
rehash toolboxcache; % Refresh toolbox cache
  • Make sure there are no files named "tf.m" or "step.m" in your MATLAB path that could be overriding the built-in functions. You can check for this by using the "which" command:
which tf -all
which step -all
If you find any custom scripts with these names, rename or remove them from your path.
  • You can try a different browser. Sometimes, browser extensions or cache can cause issues. Try accessing MATLAB Online using a different web browser or open an incognito/private browsing window to see if the problem persists.
I hope this helps!


Find more on Desktop 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!