Kaleesh - what happens when you use ginput?
[x,y] = ginput(2); % since you want 2 points
% now calculate the delta between the x or y % (not sure which is your t)
I have this code which helps me to get t1,t2 manually and then get delt How to bring in a graph and then select points interactively to get delt
--- Executes on button press in pushbutton2. function pushbutton2_Callback(hObject, eventdata, handles) % hObject handle to pushbutton2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) t1=get(handles.edit5,'string'); format long t1=str2num(t1); t2=get(handles.edit6,'string'); format long t2=str2num(t2);
delt=(t2-t1); set(handles.edit9,'string',delt);
Kaleesh - what happens when you use ginput?
[x,y] = ginput(2); % since you want 2 points
% now calculate the delta between the x or y % (not sure which is your t)
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!