When I use ginput it creates an error in input line 84:: SWITCH expression must be a scalar or string constant.

1 次查看(过去 30 天)
When I use input as [x,y] = ginput(2) it returns an error: SWITCH expression must be a scalar or string constant. This error is generated in a switch statement that depends on the variable 'mode'. The variable mode is set and generated within input.m as mode = waitForUserInput(fig) where waitForUserInput is a local function. Now this waitForUserInput looks for the figures UserData. I have used the figures UserData to store vital information on the content of the figure (I display a modified image and keep the original in UserData). So I guess I have to put the UserData somewhere else. Where else can I store the my user data so it does not interfere with Matlab functions now and in the future?
Thanks
Ronald Ouwerkerk

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interactive Control and Callbacks 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by