Filter löschen
Filter löschen

How can I put edit text 's value in popup menu in GUI surface?

1 Ansicht (letzte 30 Tage)
Onur PEKER
Onur PEKER am 23 Feb. 2014
I am trying to plot 2 seperate graph on same axes, I am taking some values from edit text.My popup menu has two element and I want to plot this two choise according to edit text's values. But I didnt call edit text's value inside popup menu and also I want to plot axes
.
if true
function popupmenu1_Callback(hObject, eventdata, handles)
val = get(hObject,'Value'); str = get(hObject, 'String'); samplerate = str2double(get(handles.samplerate_input,'String'));
airflow_input=importdata('airflow_test_data.txt'); spo2_input=importdata('spo2_test_data.txt'); switch str{val};
case 'Airflow Area'
area(handles.axes1,airflow_area(airflow_input,samplerate));
hold off;
case 'Airflow Deviation'
area(handles.axes1,airflow_dev(airflow_input,samplerate));
hold off;
function first_input_Callback(hObject, eventdata, handles)
first_input = str2double(get(hObject,'String'));
if isnan(first_input) ~isreal(first_input)
set(handles.plot_button,'String','Cannot plot samplerate')
set(handles.plot_button,'Enable','off')
uicontrol(hObject)
else
set(handles.plot_button,'String','Plot')
set(handles.plot_button,'Enable','on')
end
function first_input_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end end

Antworten (0)

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by