Info

此问题已关闭。 请重新打开它进行编辑或回答。

Cursorbar returns error when positioned at NaN

1 次查看(过去 30 天)
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], ...

回答(0 个)

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by