12.07.2015 Views

Lampiran : Flow Chart Disain GUI MATLAB Disain Uicontrol ...

Lampiran : Flow Chart Disain GUI MATLAB Disain Uicontrol ...

Lampiran : Flow Chart Disain GUI MATLAB Disain Uicontrol ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

% --- Executes on button press in tomb_selesai.function tomb_selesai_Callback(hObject, eventdata, handles)% hObject handle to tomb_selesai (see GCBO)% eventdata reserved - to be defined in a future version of <strong>MATLAB</strong>% handles structure with handles and user data (see <strong>GUI</strong>DATA)close;% --- Executes on button press in tomb_reset.function tomb_reset_Callback(hObject, eventdata, handles)% hObject handle to tomb_reset (see GCBO)% eventdata reserved - to be defined in a future version of <strong>MATLAB</strong>% handles structure with handles and user data (see <strong>GUI</strong>DATA)set(handles.ed_input,'String','0');set(handles.ed_output,'String','0');% --- Executes on button press in tomb_lihat.function tomb_lihat_Callback(hObject, eventdata, handles)% hObject handle to tomb_lihat (see GCBO)% eventdata reserved - to be defined in a future version of <strong>MATLAB</strong>% handles structure with handles and user data (see <strong>GUI</strong>DATA)indeks=get(handles.listbox1,'Value');x=[0:30:360];teta=x*pi/180;switch indekscase 1hasil = sin(teta);case 2hasil = cos(teta);case 3hasil = tan(teta);case 4hasil = cot(teta);case 5hasil = sec(teta);case 6hasil = csc(teta);case 7hasil = asin(teta);case 8hasil = acos(teta);case 9hasil = atan(teta);case 10hasil = asec(teta);case 11hasil = acot(teta);case 12hasil = acsc(teta);endy=hasil;axes(handles.axes1);plot(x,y);xlabel('Sudut (derajat)');ylabel('Nilai');grid on;isi=get(handles.listbox1,'string');tampil=isi(indeks);set(handles.text8,'string',tampil);Universitas Sumatera Utara

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!