interaction with data cursor in data inspector

조회 수: 2 (최근 30일)
fangfines
fangfines 2020년 8월 20일
댓글: David Kröter 2021년 3월 2일
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에서 Test and Measurement에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by