% code
function pushbutton1_Callback(hObject, eventdata, handles)% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%e=get(handles.e,'value');
%e=str2num(e);
h=get(handles.h,'string');set(handles.s1,'string',h);h=str2double(h);e=get(handles.e,'string');set(handles.s2,'string',e);e=str2double(e);handles.mu=398600;handles.rp=(handles.h^2)/handles.mu/(1+handles.e); %in km
handles.ra=(handles.h^2)/handles.mu/(1-handles.e); % in km
handles.a1=(handles.rp + handles.ra)/2; % in kmhandles.T1 = 2*pi/sqrt(handles.mu)*(handles.a1)^(1.5); %in seconds
%set(handles.s3,'string',rp);
end
MATLAB: I am getting an error Undefined operator ‘^’ for input arguments of type ‘matlab.ui.control.UIControl’. Error in sdpc>pushbutton1_Callback (line 159) handles.rp=(handles.h^2)/handles.mu/(1+handles.e); %in km i dont know why ?Request for hel
guidematlab functionmatlab gui
Best Answer