how do i save the data from ginput?

조회 수: 6 (최근 30일)
Franchesca
Franchesca 2014년 5월 13일
댓글: Dishant Arora 2014년 5월 13일
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?

답변 (1개)

Dishant Arora
Dishant Arora 2014년 5월 13일
data = ginput(2);
x = data(:,1);
y = data(:,2);
Or simply:
[x , y] = ginput(2);
  댓글 수: 5
Franchesca
Franchesca 2014년 5월 13일
okay so how would I refer to it later on?
Dishant Arora
Dishant Arora 2014년 5월 13일
data = handles.data;

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Labels and Annotations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by