Problem Transitioning GUIDE application to MATLAB 2014b; Unexpected Error when using Data Cursor/Zoom;; Warning Message: Error updating PointDataTip.

1 visualizzazione (ultimi 30 giorni)
I constructed a user interface using GUIDE under MATLAB 2014a. The user interface consists of a single axes object and a number of slider bars used to control the selection of data to be displayed. The actual code used to construct the display can be summarized as:
arrayForDisplay = ... % code that makes selection of data from slider bar settings
axes(handles.axes1);
imagesc(..., arrayForDisplay, ...); % code that sets values for the x and y axes, clims
Starting my application under MATLAB 2014b, I can load data into my application and the display appears as normal. I can scroll through different selections of the data using my slider bars as normal. However, if I try to place a data cursor on the axes object displaying my data, I receive a warning that appears as:
Warning: Error updating PointDataTip. Following is the chain of causes of the error:
Extent must be a real (1x2) double vector.
The requested data cursor does not appear. In addition, I observe the same error message when I use the "Zoom in" tool to zoom into and out of my data image.
This warning message does not refer to any particular line of code, so it is not so easy to see where to start looking for problems. Any suggestions? When searching for 'PointDataTip' on the MATLAB website, the single result which was returned was not helpful.

Risposta accettata

Nick Bennett
Nick Bennett il 5 Mar 2015
When using the imagesc(x,y,C,clim) command, be sure that x and y are double under MATLAB2014b. If the arguments are single precision, the warning message I indicated will occur.
Try, for example, the code
AA = rand(100,100) figure; imagesc(single(1:100), single(1:100), AA)
When placing the data cursor on the image, you will see the error I indicated.
  3 Commenti
Dev-iL
Dev-iL il 5 Lug 2015
Modificato: Dev-iL il 5 Lug 2015
@Patrick - Why not plot as double and create a custom datatip that displays the value as single? This seems like a possible workaround...
Patrick Vacek
Patrick Vacek il 29 Lug 2015
@Iliya, that's basically what I ended up doing, but it's not a truly satisfactory workaround. Why can't I just have singles like we used to be able to? The entire point is that my datasets are huge but single precision is good enough, so it saves a lot of resources to just keep everything as singles. Apparently that's just too bad now.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by