interaction with data cursor in data inspector

2 次查看(过去 30 天)
say i have the following data in time series:
t1: v1, (x1a, x1b, x1c, x1d...), (y1a, y1b, y1c, y1d...)
t2: v2, (x2a, x2b, x2c, x2d...), (y2a, y2b, y2c, y2d...)
t3: v3, (x3a, x3b, x3c, x3d...), (y3a, y3b, y3c, y3d...)
...
ti: vi, (xia, xib, xic, xid...), (yia, yib, yic, yid...)
...
tn: vn, (xna, xnb, xnc, xnd...), (yna, ynb, ync, ynd...)
i can get a time plot of (tn,vn) in data inspector, buy when i drag the data cursor to (ti,vi), is that possible i get a sync xy plot of (xi....,yi....)?
i think if i could access the position api of the data cursor, then it is possible to set the xy data of the xyplot.
but if this is possible and could this run as a interactive mode (e.g., the api could run background then when i release to drag the cursor, the xyplot automatic sync to that (xi...,yi...) at (ti) )?
thanks very much

回答(1 个)

Cam Salzberger
Cam Salzberger 2020-8-20
It sounds like you want to have have two plots, one time-domain plot that you interact with using the data cursor, and one x-y plot that gets updated based on where the data cursor is currently located.
I haven't personally tried it, but you could possibly create a custom UpdateFcn callback when calling "datacursormode", pass it the handles to the x-y plot that you need, and have that update the x-y plot based on the currently clicked position. It would also be defining what the data tip would look like, but that's not the main focus here.
-Cam
  2 个评论
fangfines
fangfines 2020-8-21
thanks very much for the suggustion.
its looks like a promising workaround if i do this in normal matlab plot.
anyway, i still wish to find a solution in simulink data inspector(https://www.mathworks.com/help/simulink/ug/visual-inspection-of-signal-data.html), which gives a more convenient ui for my analysis.
many thxs again
David Kröter
David Kröter 2021-3-2
Hello @fangfines!
I'm facing exactly the same task as you. Did you find a solution then? Would be great if you shared it with me ;-)
Best,
David

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Structures 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by