So I need to pass a number from an edit text box in the GUI to an equation, and then graph it. The edit text box is the angle of incidence or phi. So whatever number I type I need it to equal phi. The using the phi/angle of incidence I can find my my values for eps1 &eps2. Help please
function AOI_Callback(hObject, eventdata, handles)% hObject handle to AOI (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of AOI as text
% str2double(get(hObject,'String')) returns contents of AOI as a double
% --- Executes during object creation, after setting all properties.
function AOI_CreateFcn(hObject, eventdata, handles)% hObject handle to AOI (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end global phi delta psi psi=A(:,2) delta=A(:,3) phi= aoi a=sin(phi).^2 b=sin(delta).^2 c=tan(phi).^2 d=1+tan(phi).^2 e=tan(psi).^2 f=1-tan(psi).^2 g=[1-2*tan(psi)*cos(delta)+tan(pis).^2].^2 h=4*tan(psi)*sin(delta) eps1= (a*d*f.^2-4*e*b)./g eps2 = (a*c*h*f)./g
Best Answer