how do i save the data from ginput?

6 visualizaciones (últimos 30 días)
Franchesca
Franchesca el 13 de Mayo de 2014
Comentada: Dishant Arora el 13 de Mayo de 2014
This is my script:
% --- Executes on button press in pushbutton5. select finish line function pushbutton5_Callback(hObject, eventdata, handles)
data=[] data(1)=ginput(1); x=data(1){:,1} y=data(1){:,2}
i want to save the x, y points from the ginput, how would i do this?

Respuestas (1)

Dishant Arora
Dishant Arora el 13 de Mayo de 2014
data = ginput(2);
x = data(:,1);
y = data(:,2);
Or simply:
[x , y] = ginput(2);
  5 comentarios
Franchesca
Franchesca el 13 de Mayo de 2014
okay so how would I refer to it later on?
Dishant Arora
Dishant Arora el 13 de Mayo de 2014
data = handles.data;

Iniciar sesión para comentar.

Categorías

Más información sobre Labels and Annotations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by