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

12 次查看(过去 30 天)
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?

采纳的回答

MathWorks Support Team
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Software Development Tools 的更多信息

产品


版本

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by