Borrar filtros
Borrar filtros

export Data Index to Workspace

2 visualizaciones (últimos 30 días)
Amirali Kamalian
Amirali Kamalian el 23 de Mayo de 2019
Editada: Santosh Gnanasekaran el 23 de Mayo de 2019
Having a scatter plot, when I click on one of the points, I get some information regarding that point e.g. X-value and Y-value and DataIndex (generated through a customized UpdateFcn). When
UT_points = getCursorInfo(dcm_obj);
a structure is built with fields as "Target" and "Position". How can I add a customized field to this structure e.g. "Data index"?

Respuestas (1)

Santosh Gnanasekaran
Santosh Gnanasekaran el 23 de Mayo de 2019
plot(XValue,Y Value); %% Plots the data
a = get(gca,'Children');%% Gets the axes related data
xdata = get(a, 'XData'); %% extract the specific data and store it in workspace
ydata = get(a, 'YData'); %% extract the specific data and store it in workspace
close(gcf);
  2 comentarios
Amirali Kamalian
Amirali Kamalian el 23 de Mayo de 2019
xdata and ydata are identical to XValue and YValue...
Santosh Gnanasekaran
Santosh Gnanasekaran el 23 de Mayo de 2019
Editada: Santosh Gnanasekaran el 23 de Mayo de 2019
Yes, once you store these variables in workspace, you can customise the variables. For more info:
Hope this helps.

Iniciar sesión para comentar.

Categorías

Más información sobre Animation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by