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

1 view (last 30 days)
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

Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!