Why does MATLAB R2024a throw the error "Undefined function 'timer'" when interacting with a plot/figure?

12 visualizaciones (últimos 30 días)
MATLAB R2024a is giving the error below when plotting anything and then panning over the figure.
Warning: Error occurred while executing the listener callback for event WindowMouseMotion defined for class matlab.ui.Figure: Undefined function 'timer' for input arguments of type 'char'. Error in matlab.graphics.interaction.actions.Linger/startTimer Error in matlab.graphics.interaction.actions.Linger/motionCallback Error in matlab.graphics.interaction.actions.Linger Warning: Error occurred while executing the listener callback for event ButtonExited defined for class matlab.graphics.primitive.canvas.JavaCanvas: Undefined function 'timer' for input arguments of type 'char'. Error in matlab.graphics.controls.ToolbarController/createTooltipTimer Error in matlab.graphics.controls.ToolbarController/get.ToolTipTimer Error in matlab.graphics.controls.ToolbarController/doButtonUnhover Error in matlab.graphics.controls.ToolbarController/handleMouseExited Error in matlab.graphics.controls.DesktopToolbarController/handleMouseExited Error in matlab.graphics.controls.ToolbarController>@(e,d)obj.handleMouseExited(e,d)
This was not an issue in R2023b.
How can I fix this?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 5 de Abr. de 2025
Please follow the troubleshooting steps below:
1) Type the following command on the MATLAB "Command Window" and provide the output of it.
which timer -all
This will determine if the "timer" function is properly defined.
2) If the output is
'timer' not found
or if it does not point to your MATLAB R2024a installation folder followed by \MATLAB\R2024a\toolbox\matlab\timerfun\@timer\timer.m (e.g., by default, the path would be C:\Program Files\MATLAB\R2024a\toolbox\matlab\timerfun\@timer\timer.m), ensure that the "timer.m" file exists within that folder.
3) If the "timer.m" file exists, the issue is stemming from your MATLAB path definitions.
Please follow the instructions in
to resolve the issue. The page demonstrates how to restore the default MATLAB path and rehash the toolbox cache.

Más respuestas (0)

Categorías

Más información sobre Software Development Tools en Help Center y File Exchange.

Productos


Versión

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by