Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Cursorbar returns error when positioned at NaN

1 Ansicht (letzte 30 Tage)
Yong Cho
Yong Cho am 17 Apr. 2019
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
I have been using Cursorbar to read x, y values.
I have created x and y vaiable as MxN NaN at the begining and fill some data to x.
Some of the x value can still remain NaN due to unavailabilty of input data and then corresponding y would have NaN as well.
after drowing the y = f(x), (f is any function you can imagin) I polotted it using plot with cursorbar handler to read x and y data as below by setting initial positon of the cursorbar to [1 1 0]. Because the data include 'NaN' the following error occurs. But I need to keep the NaN as is in order to show that there are missing in the input data points.
Here are the full error message. Is there a way to set the position of cursorbar to a valid data point (such as peaks in y value) to avoid this kind of error?
Error using graphics.Cursorbar (line 535)
While setting the 'Position' property of Cursorbar:
Expected input to be finite.
Error in crossbar (line 83)
hTemp(1) = graphics.Cursorbar(hTarget,varargin{:});
Error in UIplot_scroll_Rx_Beam (line 84)
cb1 = crossbar(h(a),'CursorLineColor',[1 0 0], 'Position',[1 1 0], ...

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by