• Tidak ada hasil yang ditemukan

BAB V PENUTUP

B. Saran

Untuk pengembangan selanjutnya dapat disarankan untuk menambahkan jumlah bit yang disimulasi, input yang berupa suara (voice), memasukkan unsur multifath fading dan algoritma lain sebagai detektor bit.

[1] Gatot Santoso, “Sistem Selular CDMA”, Penerbit Graha Ilmu, 2004

[2] Piya Kovintavewat and Tom A Kiranantawat, “MMSE Linear Multiuser Detection for a DS-CDMA System”, ECE 6604, Personal and Mobile Communication, Spring 2000.

[3] Telkom Traning ,“Dasar Komunikasi Radio Digital”, Makalah Presentasi. [4] Yinhua Wang, Michael Chow and Sheng-Mou Yu , “QPSK Modulation and

Demodulation”, ELE 791 Softaware Radio Design, Department of Electrical Engineering, Syracuse University, Desember 2004.

[5] Simulasi Kinerja Kanal AWGN dan Kanal Fading pada Komunikasi Jaringan Wireless , Muh Arrief Nugroho ,Tugas ET5005 Sistem Komunikasi Seluler. [6] H.Vincet Poor, “Probability of Error in MMSE Detection”, IEEE Transaction

on Information Theory, Vol. 43, No. 3 May 1997.

[7] Yong Liu, “Simulation Comparison of Multiuser Receiver in DS/CDMA Systems”, EEL6503, Spread Spectrum and Code Division Multiple Acces, Nov.30 th.

[8] http://www.elektroindonesia.com/elektro/telkom10.html

[9] http://digilib.its.ac.id

[10] http://onno.vlsm.org/v11/ref-ind-1/physical/wireless/spread-spectrum-teknologi-komunikasi-digital-masa-mendatang-1.rtf

A

% the existing singleton*. %

% MMSEPROGRAM('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in MMSEPROGRAM.M with the given input arguments. %

% MMSEPROGRAM('Property','Value',...) creates a new MMSEPROGRAM or raises the % existing singleton*. Starting from the left, property value pairs are

% applied to the GUI before MMSEprogram_OpeningFunction gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to MMSEprogram_OpeningFcn via varargin. %

% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)".

%

% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to file_help MMSEprogram % Last Modified by GUIDE v2.5 29-Jul-2007 03:15:16

% Begin initialization code - DO NOT EDIT

gui_Singleton = 1;

gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ...

'gui_OpeningFcn', @MMSEprogram_OpeningFcn, ... 'gui_OutputFcn', @MMSEprogram_OutputFcn, ... 'gui_LayoutFcn', [] , ...

'gui_Callback', []); if nargin && ischar(varargin{1})

gui_State.gui_Callback = str2func(varargin{1}); end

if nargout

[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); else

gui_mainfcn(gui_State, varargin{:}); end

% End initialization code - DO NOT EDIT

% --- Executes just before MMSEprogram is made visible.

function MMSEprogram_OpeningFcn(hObject, eventdata, handles, varargin) set(handles.uipanel48,'visible','off');

set(handles.uipanel85,'visible','off'); set(handles.uipanel50,'visible','off'); set(handles.uipanel68,'visible','off');

n1_1=str2double(get(myform.text25,'string')); n1_2=str2double(get(myform.text26,'string')); n1_3=str2double(get(myform.text27,'string')); n1_4=str2double(get(myform.text28,'string')); n2_1=str2double(get(myform.text29,'string')); n2_2=str2double(get(myform.text30,'string')); n2_3=str2double(get(myform.text31,'string')); n2_4=str2double(get(myform.text32,'string')); n3_1=str2double(get(myform.text33,'string')); n3_2=str2double(get(myform.text34,'string')); n3_3=str2double(get(myform.text35,'string')); n3_4=str2double(get(myform.text36,'string'));

% Inisialisasi bit-bit pengguna

input11=str2double(get(myform.edit1,'string')); input12=str2double(get(myform.edit4,'string')); input21=str2double(get(myform.edit2,'string')); input22=str2double(get(myform.edit5,'string')); input31=str2double(get(myform.edit3,'string')); input32=str2double(get(myform.edit6,'string'));

handles.fs=str2double(get(handles.edit223,'string')); % Sampling frequency %check input

if isnan(input11)| input11>1 | input11<0

errordlg('Anda harus mengisikan angka biner 1 atau 0','Input salah','modal'); elseif isnan(input12)| input12>1 |input12<0

errordlg('Anda harus mengisikan angka biner 1 atau 0','Input salah','modal'); elseif isnan(input21)| input21>1 |input21<0

errordlg('Anda harus mengisikan angka biner 1 atau 0','Input salah','modal'); elseif isnan(input22)| input22>1 |input22<0

errordlg('Anda harus mengisikan angka biner 1 atau 0','Input salah','modal'); elseif isnan(input31)| input31>1 |input31<0

errordlg('Anda harus mengisikan angka biner 1 atau 0','Input salah','modal'); elseif isnan(input32)| input31>1 |input32<0

errordlg('Anda harus mengisikan angka biner 1 atau 0','Input salah','modal'); elseif isnan(handles.fs)

errordlg('frekuensi sampling belum dimasukkan','Input salah','modal'); else spread=[n1_1,n1_2,n1_3,n1_4;n2_1,n2_2,n2_3,n2_4;n3_1,n3_2,n3_3,n3_4]; input=[input11,input12;input21,input22;input31,input32]; kolom_input=size(input,2); baris_input=size(input,1); L=baris_input; for y=1:kolom_input for o=1:baris_input b=[input(o,y),input(o,y),input(o,y),input(o,y)];

codes=[spread(o,:)]; % spreading codes untuk pengguna ke-x,yang diambil adalah nilai baris dari matriks spread yang berisi full matriks hadamard

hsl_xor=xor(b,codes); for j=1:3 for m=1:4 if hsl_xor(1,m)<1 hsl_xor_total(m)=-1; else

spread_total (j,m)=1; end spread_ubah(j,m)=spread_total(j,m); end% untuk m end% untuk j end%untuk o if y==1 hsl_xor_simbol1=hsl_xor_ubah; else hsl_xor_simbol2=hsl_xor_ubah; end end%untuk y % bit 1

a1=hsl_xor_simbol1(1,1);set(myform.ed_spread11,'string',num2str(a1)); b1=hsl_xor_simbol1(1,2);set(myform.ed_spread12,'string',num2str(b1)); c1=hsl_xor_simbol1(1,3);set(myform.ed_spread13,'string',num2str(c1)); d1=hsl_xor_simbol1(1,4);set(myform.ed_spread14,'string',num2str(d1)); e1=hsl_xor_simbol1(2,1);set(myform.ed_spread21,'string',num2str(e1)); f1=hsl_xor_simbol1(2,2);set(myform.ed_spread22,'string',num2str(f1)); g1=hsl_xor_simbol1(2,3);set(myform.ed_spread23,'string',num2str(g1)); h1=hsl_xor_simbol1(2,4);set(myform.ed_spread24,'string',num2str(h1)); i1=hsl_xor_simbol1(3,1);set(myform.ed_spread31,'string',num2str(i1)); j1=hsl_xor_simbol1(3,2);set(myform.ed_spread32,'string',num2str(j1)); k1=hsl_xor_simbol1(3,3);set(myform.ed_spread33,'string',num2str(k1)); l1=hsl_xor_simbol1(3,4);set(myform.ed_spread34,'string',num2str(l1));

% bit 2

a2=hsl_xor_simbol2(1,1);set(myform.edit11,'string',num2str(a2)); b2=hsl_xor_simbol2(1,2);set(myform.edit12,'string',num2str(b2)); c2=hsl_xor_simbol2(1,3);set(myform.edit13,'string',num2str(c2)); d2=hsl_xor_simbol2(1,4);set(myform.edit14,'string',num2str(d2)); e2=hsl_xor_simbol2(2,1);set(myform.edit19,'string',num2str(e2)); f2=hsl_xor_simbol2(2,2);set(myform.edit20,'string',num2str(f2)); g2=hsl_xor_simbol2(2,3);set(myform.edit21,'string',num2str(g2)); h2=hsl_xor_simbol2(2,4);set(myform.edit22,'string',num2str(h2)); i2=hsl_xor_simbol2(3,1);set(myform.edit27,'string',num2str(i2)); j2=hsl_xor_simbol2(3,2);set(myform.edit28,'string',num2str(j2)); k2=hsl_xor_simbol2(3,3);set(myform.edit29,'string',num2str(k2)); l2=hsl_xor_simbol2(3,4);set(myform.edit30,'string',num2str(l2));

handles.user1=[a1,b1,c1,d1,a2,b2,c2,d2]; handles.user2=[e1,f1,g1,h1,e2,f2,g2,h2]; handles.user3=[i1,j1,k1,l1,i2,j2,k2,l2];

handles.N=length(handles.user1); % jumlah bit(bit rate)

handles.Ts=1/handles.fs; % Sampling time = 1/fs

handles.T=1/handles.N;

td=[0:handles.Ts:(handles.N*handles.T)-handles.Ts]';% Time vector(data)(transpose)

set(handles.edit224,'string',handles.Ts); set(handles.edit225,'string',handles.N); set(handles.edit226,'string',handles.T);

axis([0 1 -2 2]);

% plot spread user 2

spread2=ones(handles.T/handles.Ts,1)*handles.user2; data2=spread2(:);

axes(handles.axes17)

plot(td,data2),grid on,xlabel(' Time') ylabel('Amplitude'),title('User 2')

axis([0 1 -2 2]);

% plot spread user 3

spread3=ones(handles.T/handles.Ts,1)*handles.user3; data3=spread3(:);

axes(handles.axes18)

plot(td,data3),grid on,xlabel(' Time') ylabel('Amplitude'),title('User 3')

axis([0 1 -2 2]);

% plot spread total

handles.user_all=[handles.user1+handles.user2+handles.user3]; spread_total=ones(handles.T/handles.Ts,1)*handles.user_all; data_total=spread_total(:);

axes(handles.axes19)

plot(td,data_total),grid on,xlabel(' Time') ylabel('Amplitude'),title('All user')

axis([0 1 -4 4]);

text1=get(handles.pushbutton1,'value'); if text1==1;

set(handles.text275,'string','Sinyal Hasil Spreading','position',[1.2 21.46 25 1]); set(handles.text276,'string','Sinyal Spreading Total','position',[4 22.66 25 1]); end

end

% 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)

% --- Executes on button press in radiobutton1.

function radiobutton1_Callback(hObject, eventdata, handles) myform=guidata(GCBO); set(handles.radiobutton2,'value',0) n1_1=str2double(get(myform.text1,'string')); n1_2=str2double(get(myform.text2,'string')); n1_3=str2double(get(myform.text3,'string')); n1_4=str2double(get(myform.text4,'string')); n2_1=str2double(get(myform.text5,'string')); n2_2=str2double(get(myform.text6,'string')); n2_3=str2double(get(myform.text7,'string')); n2_4=str2double(get(myform.text8,'string')); n3_1=str2double(get(myform.text9,'string')); n3_2=str2double(get(myform.text10,'string')); n3_3=str2double(get(myform.text11,'string')); n3_4=str2double(get(myform.text12,'string'));

set(myform.text29,'string',num2str(n2_1)); set(myform.text30,'string',num2str(n2_2)); set(myform.text31,'string',num2str(n2_3)); set(myform.text32,'string',num2str(n2_4)); set(myform.text33,'string',num2str(n3_1)); set(myform.text34,'string',num2str(n3_2)); set(myform.text35,'string',num2str(n3_3)); set(myform.text36,'string',num2str(n3_4));

% --- Executes on button press in radiobutton2.

function radiobutton2_Callback(hObject, eventdata, handles) myform=guidata(GCBO); set(handles.radiobutton1,'value',0) n1_a=str2double(get(myform.text13,'string')); n1_b=str2double(get(myform.text14,'string')); n1_c=str2double(get(myform.text15,'string')); n1_d=str2double(get(myform.text16,'string')); n2_a=str2double(get(myform.text17,'string')); n2_b=str2double(get(myform.text18,'string')); n2_c=str2double(get(myform.text19,'string')); n2_d=str2double(get(myform.text20,'string')); n3_a=str2double(get(myform.text21,'string')); n3_b=str2double(get(myform.text22,'string')); n3_c=str2double(get(myform.text23,'string')); n3_d=str2double(get(myform.text24,'string'));

% pindahkan spreading code tipe 2

set(myform.text25,'string',num2str(n1_a)); set(myform.text26,'string',num2str(n1_b)); set(myform.text27,'string',num2str(n1_c)); set(myform.text28,'string',num2str(n1_d)); set(myform.text29,'string',num2str(n2_a)); set(myform.text30,'string',num2str(n2_b)); set(myform.text31,'string',num2str(n2_c)); set(myform.text32,'string',num2str(n2_d)); set(myform.text33,'string',num2str(n3_a)); set(myform.text34,'string',num2str(n3_b)); set(myform.text35,'string',num2str(n3_c)); set(myform.text36,'string',num2str(n3_d));

% --- Executes on button press in pushbutton3.

function pushbutton3_Callback(hObject, eventdata, handles)

% z=str2num(get(myform.ed_spread11,'MMSEprogram.fig','string')); % set(myform.spread1,'string','modqpsk.fig',num2str(z));

% hObject handle to pushbutton3 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

errordlg('Anda harus mengisikan nilai biner 1 atau 0 ','Input salah','modal') end

% hObject handle to edit1 (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 edit1 as text

% str2double(get(hObject,'String')) returns contents of edit1 as a double

% --- Executes during object creation, after setting all properties.

function edit1_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit1 (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

function edit2_Callback(hObject, eventdata, handles) c = str2double(get(hObject,'string'));

if c>1 | c<0

errordlg('Anda harus mengisikan nilai biner 1 atau 0 ','Input salah','modal') end

% hObject handle to edit2 (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 edit2 as text

% str2double(get(hObject,'String')) returns contents of edit2 as a double

% --- Executes during object creation, after setting all properties.

function edit2_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit2 (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

% 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 edit3 as text

% str2double(get(hObject,'String')) returns contents of edit3 as a double

% --- Executes during object creation, after setting all properties.

function edit3_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit3 (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

function edit4_Callback(hObject, eventdata, handles) c = str2double(get(hObject,'string'));

if c>1 | c<0

errordlg('Anda harus mengisikan nilai biner 1 atau 0 ','Input salah','modal') end

% hObject handle to edit4 (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 edit4 as text

% str2double(get(hObject,'String')) returns contents of edit4 as a double

end

function edit5_Callback(hObject, eventdata, handles) c = str2double(get(hObject,'string'));

if c>1 | c<0

errordlg('Anda harus mengisikan nilai biner 1 atau 0 ','Input salah','modal') end

% hObject handle to edit5 (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 edit5 as text

% str2double(get(hObject,'String')) returns contents of edit5 as a double % --- Executes during object creation, after setting all properties.

function edit5_CreateFcn(hObject, eventdata, handles)

% See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');

end

function edit6_Callback(hObject, eventdata, handles) c = str2double(get(hObject,'string'));

if c>1 | c<0

errordlg('Anda harus mengisikan nilai biner 1 atau 0 ','Input salah','modal') end

% hObject handle to edit6 (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 edit6 as text

% str2double(get(hObject,'String')) returns contents of edit6 as a double % --- Executes during object creation, after setting all properties.

end

%

---function file_Callback(hObject, eventdata, handles)

% hObject handle to file (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) %

---function file_reset_Callback(hObject, eventdata, handles) set(handles.text25,'string','');set(handles.text26,'string',''); set(handles.text27,'string','');set(handles.text28,'string',''); set(handles.text29,'string','');set(handles.text30,'string',''); set(handles.text31,'string','');set(handles.text32,'string',''); set(handles.text33,'string','');set(handles.text34,'string',''); set(handles.text35,'string','');set(handles.text36,'string','');

% clear input

set(handles.edit1,'string','');set(handles.edit222,'string',''); set(handles.edit2,'string','');set(handles.edit223,'string',''); set(handles.edit3,'string','');set(handles.edit224,'string',''); set(handles.edit4,'string','');set(handles.edit225,'string',''); set(handles.edit5,'string','');set(handles.edit226,'string',''); set(handles.edit6,'string','');

%clear hasil spreading

set(handles.ed_spread11,'string','');set(handles.ed_spread12,'string',''); set(handles.ed_spread13,'string','');set(handles.ed_spread14,'string',''); set(handles.ed_spread21,'string','');set(handles.ed_spread22,'string',''); set(handles.ed_spread23,'string','');set(handles.ed_spread24,'string',''); set(handles.ed_spread31,'string','');set(handles.ed_spread32,'string',''); set(handles.ed_spread33,'string','');set(handles.ed_spread34,'string',''); set(handles.edit11,'string','');set(handles.edit12,'string','');

set(handles.edit13,'string','');set(handles.edit14,'string',''); set(handles.edit19,'string','');set(handles.edit20,'string',''); set(handles.edit21,'string','');set(handles.edit22,'string','');

set(handles.edit76,'string',''); set(handles.edit77,'string',''); set(handles.edit78,'string',''); set(handles.edit79,'string',''); set(handles.edit80,'string',''); set(handles.edit81,'string',''); set(handles.edit82,'string',''); set(handles.edit83,'string',''); set(handles.edit84,'string',''); set(handles.edit85,'string',''); set(handles.edit86,'string',''); set(handles.edit87,'string',''); set(handles.edit88,'string',''); set(handles.edit89,'string',''); set(handles.edit90,'string',''); set(handles.edit91,'string',''); set(handles.edit92,'string',''); set(handles.edit93,'string','');

%clear modulasi total

set(handles.edit94,'string',''); set(handles.edit96,'string',''); set(handles.edit98,'string',''); set(handles.edit100,'string',''); set(handles.edit95,'string',''); set(handles.edit97,'string',''); set(handles.edit99,'string',''); set(handles.edit101,'string','');

%clear radiobutton

set(handles.radiobutton1,'value',0); set(handles.radiobutton2,'value',0);

%clear text grafik

set(handles.text275,'string','','position',[0.6 21.46 0.5 0.5]);set(handles.text276,'string','','position',[5.8 24 0.5 0.5]);

%clear gambar axes(handles.axes16) handles.user1=0; plot(handles.user1),grid on axes(handles.axes17) handles.user2=0; plot(handles.user2),grid on axes(handles.axes18) handles.user3=0; plot(handles.user3),grid on axes(handles.axes19) handles.user_all=0; plot(handles.user_all),grid on guidata(hObject,handles);

% hObject handle to file_reset (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) %

---function file_help_Callback(hObject, eventdata, handles)

% hObject handle to file_help (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % --- Executes on button press in pushbutton8.

function pushbutton8_Callback(hObject, eventdata, handles) myform=guidata(GCBO);

b1_1=str2double(get(myform.ed_spread11,'string')); b1_2=str2double(get(myform.ed_spread12,'string')); b1_3=str2double(get(myform.ed_spread13,'string'));

c1_4=str2double(get(myform.ed_spread24,'string')); d1_1=str2double(get(myform.ed_spread31,'string')); d1_2=str2double(get(myform.ed_spread32,'string')); d1_3=str2double(get(myform.ed_spread33,'string')); d1_4=str2double(get(myform.ed_spread34,'string')); hsl_xor_simbol1=[b1_1,b1_2,b1_3,b1_4;c1_1,c1_2,c1_3,c1_4;d1_1,d1_2,d1_3,d1_4]; b2_1=str2double(get(myform.edit11,'string')); b2_2=str2double(get(myform.edit12,'string')); b2_3=str2double(get(myform.edit13,'string')); b2_4=str2double(get(myform.edit14,'string')); c2_1=str2double(get(myform.edit19,'string')); c2_2=str2double(get(myform.edit20,'string')); c2_3=str2double(get(myform.edit21,'string')); c2_4=str2double(get(myform.edit22,'string')); d2_1=str2double(get(myform.edit27,'string')); d2_2=str2double(get(myform.edit28,'string')); d2_3=str2double(get(myform.edit29,'string')); d2_4=str2double(get(myform.edit30,'string')); hsl_xor_simbol2=[b2_1,b2_2,b2_3,b2_4;c2_1,c2_2,c2_3,c2_4;d2_1,d2_2,d2_3,d2_4]; if isnan(hsl_xor_simbol1)

errordlg('Proses spreading belum dikerjakan','input salah','modal') elseif isnan(hsl_xor_simbol2)

errordlg('Proses spreading belum dikerjakan','input salah','modal') else a=2*pi; % modulasi QPSK bit 1 modulasi_I_n1a=hsl_xor_simbol1(:,1)*1.4142*cos(a+pi/4); modulasi_I_n1b=hsl_xor_simbol1(:,3)*1.4142*cos(a+pi/4); modulasi_Q_n1a=hsl_xor_simbol1(:,2)*1.4142*sin(a+pi/4); modulasi_Q_n1b=hsl_xor_simbol1(:,4)*1.4142*sin(a+pi/4);

handles.hasil1=[modulasi_I_n1a,modulasi_Q_n1a, modulasi_I_n1b, modulasi_Q_n1b]; set(myform.edit70,'string',sprintf('%0.2f',(handles.hasil1(1,1))));

set(myform.edit71,'string',sprintf('%0.2f',(handles.hasil1(2,1)))); set(myform.edit72,'string',sprintf('%0.2f',(handles.hasil1(3,1)))); set(myform.edit73,'string',sprintf('%0.2f',(handles.hasil1(1,2)))); set(myform.edit74,'string',sprintf('%0.2f',(handles.hasil1(2,2)))); set(myform.edit75,'string',sprintf('%0.2f',(handles.hasil1(3,2)))); set(myform.edit76,'string',sprintf('%0.2f',(handles.hasil1(1,3)))); set(myform.edit77,'string',sprintf('%0.2f',(handles.hasil1(2,3)))); set(myform.edit78,'string',sprintf('%0.2f',(handles.hasil1(3,3)))); set(myform.edit79,'string',sprintf('%0.2f',(handles.hasil1(1,4)))); set(myform.edit80,'string',sprintf('%0.2f',(handles.hasil1(2,4)))); set(myform.edit81,'string',sprintf('%0.2f',(handles.hasil1(3,4))));

% modulasi QPSK bit 1 modulasi_I_n2a=hsl_xor_simbol2(:,1)*1.4142*cos(a+pi/4); modulasi_I_n2b=hsl_xor_simbol2(:,3)*1.4142*cos(a+pi/4); modulasi_Q_n2a=hsl_xor_simbol2(:,2)*1.4142*sin(a+pi/4); modulasi_Q_n2b=hsl_xor_simbol2(:,4)*1.4142*sin(a+pi/4); handles.hasil2=[modulasi_I_n2a,modulasi_Q_n2a,modulasi_I_n2b,modulasi_Q_n2b]; set(myform.edit82,'string',sprintf('%0.2f',(handles.hasil2(1,1))));

set(myform.edit83,'string',sprintf('%0.2f',(handles.hasil2(2,1)))); set(myform.edit84,'string',sprintf('%0.2f',(handles.hasil2(3,1))));

set(myform.edit91,'string',sprintf('%0.2f',(handles.hasil2(1,4)))); set(myform.edit92,'string',sprintf('%0.2f',(handles.hasil2(2,4)))); set(myform.edit93,'string',sprintf('%0.2f',(handles.hasil2(3,4))));

% Plot Sinyal Modulasi QPSK

handles.fs=str2double(get(handles.edit223,'string')); % Sampling frequency

handles.N=8; % jumlah bit(bit rate)

handles.Ts=1/handles.fs; % Sampling time = 1/fs

handles.T=1/handles.N;

handles.fcarr=str2double(get(handles.edit222,'string')); % Carrier frequency(Hz)

handles.tiq = [0:handles.Ts*2:(handles.N*handles.T)-handles.Ts]';% Time vector for I and Q symbols (transpose)

handles.a=sqrt(2);% amplitudo sinyal

handles.phi=pi/4;% phase sinyal

%===========================================%

% Modulasi QPSK untuk user 1 %

%===========================================%

user1=[b1_1,b1_2,b1_3,b1_4,b2_1,b2_2,b2_3,b2_4]; % data hasil spreading user 1 %untuk kanal I

bs11=user1(1:2:length(user1));% bit ganjil

symbols11=ones(handles.T/handles.Ts,1)*bs11; Isymbols11=symbols11(:);%I_waveform

%untuk kanal Q

bs12=user1(2:2:length(user1));%bit genap

symbols12=ones(handles.T/handles.Ts,1)*bs12; Qsymbols12=symbols12(:);%Q_waveform %2 pi fc t

twopi_fc_t=(1:handles.fs/2)*2*pi*handles.fcarr/handles.fs; cs_t1 = handles.a * cos(twopi_fc_t + handles.phi); sn_t1 = handles.a * sin(twopi_fc_t + handles.phi); cs_t1=cs_t1';%transpose

sn_t1=sn_t1';%transpose

handles.si1=cs_t1.*Isymbols11; handles.sq1=sn_t1.*Qsymbols12;

handles.sumiq11=handles.si1+handles.sq1;

handles.sumiq1=.7*handles.sumiq11;%reduce gain to keep output at +/- one

axes(handles.axes16)

plot(handles.tiq,handles.sumiq1) axis([0 1 -2 2]);grid on

xlabel(' Time') ylabel('Amplitude'),title('User 1')

%===========================================%

%Modulasi QPSK untuk user 2

%===========================================%

user2=[c1_1,c1_2,c1_3,c1_4,c2_1,c2_2,c2_3,c2_4];

% untuk kanal I

bs21=user2(1:2:length(user2));% bit ganjil

symbols21=ones(handles.T/handles.Ts,1)*bs21; Isymbols21=symbols21(:);%I_waveform

% untuk kanal Q

cs_t2 = handles.a * cos(twopi_fc_t + handles.phi); sn_t2 = handles.a * sin(twopi_fc_t + handles.phi); cs_t2=cs_t2';%transpose

sn_t2=sn_t2';%transpose

handles.si2=cs_t2.*Isymbols21; handles.sq2=sn_t2.*Qsymbols22; sumiq22=handles.si2+handles.sq2;

sumiq2=.7*sumiq22;%reduce gain to keep output at +/- one

axes(handles.axes17) plot(handles.tiq,sumiq2) axis([0 1 -2 2]);grid on

xlabel(' Time') ylabel('Amplitude'),title('User 2')

%===========================================%

%Modulasi QPSK untuk user 3

%===========================================%

user3=[d1_1,d1_2,d1_3,d1_4,d2_1,d2_2,d2_3,d2_4]; bs31=user3(1:2:length(user3));% bit ganjil

symbols31=ones(handles.T/handles.Ts,1)*bs31; Isymbols31=symbols31(:);%I_waveform

%untuk kanal Q

bs32=user3(2:2:length(user3));%bit genap

symbols32=ones(handles.T/handles.Ts,1)*bs32; Qsymbols32=symbols32(:);%Q_waveform %2 pi fc t

twopi_fc_t=(1:handles.fs/2)*2*pi*handles.fcarr/handles.fs; cs_t3 = handles.a * cos(twopi_fc_t + handles.phi); sn_t3 = handles.a * sin(twopi_fc_t + handles.phi); cs_t3=cs_t3';%transpose

sn_t3=sn_t3';%transpose

handles.si3=cs_t3.*Isymbols31; handles.sq3=sn_t3.*Qsymbols32; sumiq32=handles.si3+handles.sq3;

sumiq3=.7*sumiq32;%reduce gain to keep output at +/- one

axes(handles.axes18) plot(handles.tiq,sumiq3) axis([0 1 -2 2]);grid on

xlabel(' Time') ylabel('Amplitude'),title('User 3')

text2=get(handles.pushbutton8,'value'); if text2==1;

set(handles.text275,'string','Sinyal Hasil Modulasi QPSK','position',[0.6 21.4 30 1]) set(handles.text276,'string','','position',[0.6 21.4 1 1])

end axes(handles.axes19) handles.user_all=0; plot(handles.user_all),grid on guidata(hObject,handles); end

% ambil data modulasi QPSK bit 1 b1_1=str2double(get(myform.edit70,'string')); b1_2=str2double(get(myform.edit73,'string')); b1_3=str2double(get(myform.edit76,'string')); b1_4=str2double(get(myform.edit79,'string')); c1_1=str2double(get(myform.edit71,'string')); c1_2=str2double(get(myform.edit74,'string')); c1_3=str2double(get(myform.edit77,'string')); c1_4=str2double(get(myform.edit80,'string')); d1_1=str2double(get(myform.edit72,'string')); d1_2=str2double(get(myform.edit75,'string')); d1_3=str2double(get(myform.edit78,'string')); d1_4=str2double(get(myform.edit81,'string')); hsl_xor_simbol1=[b1_1,b1_2,b1_3,b1_4;c1_1,c1_2,c1_3,c1_4;d1_1,d1_2,d1_3,d1_4];

% ambil data modulasi QPSK bit 2

b2_1=str2double(get(myform.edit82,'string')); b2_2=str2double(get(myform.edit85,'string')); b2_3=str2double(get(myform.edit88,'string')); b2_4=str2double(get(myform.edit91,'string')); c2_1=str2double(get(myform.edit83,'string')); c2_2=str2double(get(myform.edit86,'string')); c2_3=str2double(get(myform.edit89,'string')); c2_4=str2double(get(myform.edit92,'string')); d2_1=str2double(get(myform.edit84,'string')); d2_2=str2double(get(myform.edit87,'string')); d2_3=str2double(get(myform.edit90,'string')); d2_4=str2double(get(myform.edit93,'string')); hsl_xor_simbol2=[b2_1,b2_2,b2_3,b2_4;c2_1,c2_2,c2_3,c2_4;d2_1,d2_2,d2_3,d2_4];

% pembentukan modulasi total bit 1

if isnan(hsl_xor_simbol1)

errordlg('hasil modulasi belum dikerjakan','input salah') elseif isnan(hsl_xor_simbol2)

errordlg('hasil modulasi belum dikerjakan','input salah') else

% pembentukan modulasi total bit 1

besar_modulasi_I_total_n11=hsl_xor_simbol1(1,1)+hsl_xor_simbol1(2,1)+hsl_xor_simbol1(3,1); besar_modulasi_I_total_n12=hsl_xor_simbol1(1,3)+hsl_xor_simbol1(2,3)+hsl_xor_simbol1(3,3); besar_modulasi_Q_total_n11=hsl_xor_simbol1(1,2)+hsl_xor_simbol1(2,2)+hsl_xor_simbol1(3,2); besar_modulasi_Q_total_n12=hsl_xor_simbol1(1,4)+hsl_xor_simbol1(2,4)+hsl_xor_simbol1(3,4);

% pembentukan modulasi total bit 2

besar_modulasi_I_total_n21=hsl_xor_simbol2(1,1)+hsl_xor_simbol2(2,1)+hsl_xor_simbol2(3,1); besar_modulasi_I_total_n22=hsl_xor_simbol2(1,3)+hsl_xor_simbol2(2,3)+hsl_xor_simbol2(3,3); besar_modulasi_Q_total_n21=hsl_xor_simbol2(1,2)+hsl_xor_simbol2(2,2)+hsl_xor_simbol2(3,2); besar_modulasi_Q_total_n22=hsl_xor_simbol2(1,4)+hsl_xor_simbol2(2,4)+hsl_xor_simbol2(3,4); transmisi=zeros(2,4); transmisi(1,1)=besar_modulasi_I_total_n11; transmisi(1,2)=besar_modulasi_Q_total_n11; transmisi(1,3)=besar_modulasi_I_total_n12;

transmisi(2,4)=besar_modulasi_Q_total_n22; SNR=str2double(get(myform.edit225,'string')); transmisi=awgn(transmisi,SNR,'measured'); besar_modulasi_I_total_n11=transmisi(1,1); besar_modulasi_Q_total_n11=transmisi(1,2); besar_modulasi_I_total_n12=transmisi(1,3); besar_modulasi_Q_total_n12=transmisi(1,4); besar_modulasi_I_total_n21=transmisi(2,1); besar_modulasi_Q_total_n21=transmisi(2,2); besar_modulasi_I_total_n22=transmisi(2,3); besar_modulasi_Q_total_n22=transmisi(2,4); modulasi_total=[besar_modulasi_I_total_n11,besar_modulasi_Q_total_n11,besar_modulasi_I_tot al_n12,... besar_modulasi_Q_total_n12,besar_modulasi_I_total_n21,besar_modulasi_Q_total_n21,... besar_modulasi_I_total_n22,besar_modulasi_Q_total_n22]

set(myform.edit94,'string',sprintf('%0.3f',(modulasi_total(1,1)))); set(myform.edit96,'string',sprintf('%0.3f',(modulasi_total(1,2)))); set(myform.edit98,'string',sprintf('%0.3f',(modulasi_total(1,3)))); set(myform.edit100,'string',sprintf('%0.3f',(modulasi_total(1,4)))); set(myform.edit95,'string',sprintf('%0.3f',(modulasi_total(1,5)))); set(myform.edit97,'string',sprintf('%0.3f',(modulasi_total(1,6)))); set(myform.edit99,'string',sprintf('%0.3f',(modulasi_total(1,7)))); set(myform.edit101,'string',sprintf('%0.3f',(modulasi_total(1,8))));

% plot grafik modulasi % untuk kanal I

mod_total1=modulasi_total(1:2:length(modulasi_total));% bit ganjil

kanalI=ones(handles.T/handles.Ts,1)*mod_total1; Isymbols=kanalI(:);%I_waveform

% untuk kanal Q

mod_total2=modulasi_total(2:2:length(modulasi_total));%bit genap

kanalQ=ones(handles.T/handles.Ts,1)*mod_total2; Qsymbols=kanalQ(:);%Q_waveform

%2 pi fc t

twopi_fc_t=(1:handles.fs/2)*2*pi*handles.fcarr/handles.fs; cs_t = handles.a * cos(twopi_fc_t + handles.phi);

sn_t = handles.a * sin(twopi_fc_t + handles.phi); cs_t=cs_t';%transpose

sn_t=sn_t';%transpose

si=cs_t.*Isymbols; sq=sn_t.*Qsymbols; sumiq1=si+sq;

sumiq=.7*sumiq1;%reduce gain to keep output at +/- one

axes(handles.axes19) plot(handles.tiq,sumiq)

% axis([0 1 -5 5]);

grid on

end

% hObject handle to pushbutton9 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% --- Executes on button press in pushbutton12.

function pushbutton12_Callback(hObject, eventdata, handles) pilihan = questdlg(['Keluar ',get(handles.figure1,'Name') ' ?'],... ['Keluar ',get(handles.figure1,'Name') '...'],...

'Ya','Tidak','Ya'); if strcmp(pilihan,'Tidak') return;

end

delete(handles.figure1)

% hObject handle to pushbutton12 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % --- Executes on button press in pushbutton13.

function pushbutton13_Callback(hObject, eventdata, handles) set(handles.uipanel38,'visible','off');

set(handles.uipanel39,'visible','off'); set(handles.uipanel40,'visible','off'); set(handles.uipanel1,'visible','off'); set(handles.uipanel42,'visible','off');

set(handles.uipanel69,'visible','on'); set(handles.uipanel48,'visible','on'); set(handles.uipanel85,'visible','on'); set(handles.uipanel50,'visible','on'); set(handles.uipanel68,'visible','on');

% hObject handle to pushbutton13 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % --- Executes on button press in tom_dtotal.

function tom_dtotal_Callback(hObject, eventdata, handles)

% FILE DEMODULASI QPSK besar_modulasi_I_total_n11=str2double(get(handles.edit94,'string')); besar_modulasi_Q_total_n11=str2double(get(handles.edit96,'string')); besar_modulasi_I_total_n12=str2double(get(handles.edit98,'string')); besar_modulasi_Q_total_n12=str2double(get(handles.edit100,'string')); besar_modulasi_I_total_n21=str2double(get(handles.edit95,'string')); besar_modulasi_Q_total_n21=str2double(get(handles.edit97,'string')); besar_modulasi_I_total_n22=str2double(get(handles.edit99,'string'));

besar_modulasi_Q_total_n12,besar_modulasi_I_total_n21,besar_modulasi_Q_total_n21,... besar_modulasi_I_total_n22,besar_modulasi_Q_total_n22];

if isnan(mod_total)

errordlg('Proses Modulasi belum dikerjakan','input salah','modal') else

%batas bawah dan atas integral

b=0; c=1;

%Demodulasi masing-masing pengguna

data_input(1,1)=besar_modulasi_I_total_n11*2*(-1/2*(- 2*cos(c*pi)^3*sin(c*pi)+sin(c*pi)*cos(c*pi)-c*pi+ 2*cos(b*pi)^3*sin(b*pi)-sin(b*pi)*cos(b*pi)+b*pi)/pi); data_input(1,2)=besar_modulasi_Q_total_n11*2*(1/2*(-cos(c*pi)^4+cos(c*pi)^2+sin(c*pi)^2*cos(c*pi)^2+c*pi+. cos(b*pi)^4-cos(b*pi)^2-sin(b*pi)^2*cos(b*pi)^2-b*pi)/pi); data_input(1,3)=besar_modulasi_I_total_n12*2*(-1/2* (-2*cos(c*pi)^3*sin(c*pi)+sin(c*pi)*cos(c*pi)-c*pi+ 2*cos(b*pi)^3*sin(b*pi)-sin(b*pi)*cos(b*pi)+b*pi)/pi); data_input(1,4)=besar_modulasi_Q_total_n12*2*(1/2*(-cos(c*pi)^4+cos(c*pi)^2+sin(c*pi)^2*cos(c*pi)^2+c*pi+ cos(b*pi)^4-cos(b*pi)^2-sin(b*pi)^2*cos(b*pi)^2-b*pi)/pi); data_input(2,1)=besar_modulasi_I_total_n21*2*(-1/2*(- 2*cos(c*pi)^3*sin(c*pi)+sin(c*pi)*cos(c*pi)-c*pi+2*cos(b*pi)^3*sin(b*pi)-sin(b*pi)*cos(b*pi)+b*pi)/pi); data_input(2,2)=besar_modulasi_Q_total_n21*2*(1/2*(-cos(c*pi)^4+cos(c*pi)^2+sin(c*pi)^2*cos(c*pi)^2+c*pi+ cos(b*pi)^4-cos(b*pi)^2-sin(b*pi)^2*cos(b*pi)^2-b*pi)/pi); data_input(2,3)=besar_modulasi_I_total_n22*2*(-1/2*(- 2*cos(c*pi)^3*sin(c*pi)+sin(c*pi)*cos(c*pi)-c*pi+2*cos(b*pi)^3*sin(b*pi)-sin(b*pi)*cos(b*pi)+b*pi)/pi); data_input(2,4)=besar_modulasi_Q_total_n22*2*(1/2*(-cos(c*pi)^4+cos(c*pi)^2+sin(c*pi)^2*cos(c*pi)^2+c*pi+ cos(b*pi)^4-cos(b*pi)^2-sin(b*pi)^2*cos(b*pi)^2-b*pi)/pi); daftar_data=data_input; demodulasi_total=[data_input(1,1),data_input(1,3),data_input(2,1),data_input(2,3);... data_input(1,2),data_input(1,4),data_input(2,2),data_input(2,4)];

set(handles.edit134,'string',sprintf('%0.3f',(demodulasi_total(1,1)))); set(handles.edit138,'string',sprintf('%0.3f',(demodulasi_total(2,1)))); set(handles.edit136,'string',sprintf('%0.3f',(demodulasi_total(1,2)))); set(handles.edit141,'string',sprintf('%0.3f',(demodulasi_total(2,2))));

sinyalI1a=data_input(1,1); sinyalI1b=data_input(1,3); sinyalI1c=data_input(2,1); sinyalI1d=data_input(2,3); % Plot Channel Q sinyalQ1a=data_input(1,2); sinyalQ1b=data_input(1,4); sinyalQ1c=data_input(2,2); sinyalQ1d=data_input(2,4); IQ_total=[sinyalI1a,sinyalQ1a,sinyalI1b,sinyalQ1b,sinyalI1c,sinyalQ1c,sinyalI1d,sinyalQ1d]; % untuk kanal I

mod_total1=IQ_total(1:2:length(IQ_total));% bit ganjil

kanalI=ones(handles.T/handles.Ts,1)*mod_total1; Isymbols=kanalI(:);%I_waveform

% untuk kanal Q

mod_total2=IQ_total(2:2:length(IQ_total));%bit genap

kanalQ=ones(handles.T/handles.Ts,1)*mod_total2; Qsymbols=kanalQ(:);%Q_waveform

%2 pi fc t

twopi_fc_t=(1:handles.fs/2)*2*pi*handles.fcarr/handles.fs; cs_t = handles.a * cos(twopi_fc_t + handles.phi);

sn_t = handles.a * sin(twopi_fc_t + handles.phi); cs_t=cs_t';%transpose

sn_t=sn_t';%transpose

si=cs_t.*Isymbols; sq=sn_t.*Qsymbols; sumiq1=si+sq;

sumiq=.7*sumiq1;%reduce gain to keep output at +/- one

axes(handles.axes23) plot(handles.tiq,sumiq) % axis([0 1 -5 5]); grid on xlabel(' Time') ylabel('Amplitude')

title(' All User ')

text2=get(handles.pushbutton9,'value');

function tom_demod_Callback(hObject, eventdata, handles)

% hObject handle to tom_demod (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % --- Executes on button press in pushbutton19.

function pushbutton19_Callback(hObject, eventdata, handles)

%Ambil spreading code

n1_1=str2double(get(handles.text25,'string')); n1_2=str2double(get(handles.text26,'string')); n1_3=str2double(get(handles.text27,'string')); n1_4=str2double(get(handles.text28,'string'));

n3_1=str2double(get(handles.text33,'string')); n3_2=str2double(get(handles.text34,'string')); n3_3=str2double(get(handles.text35,'string')); n3_4=str2double(get(handles.text36,'string')); spread_ubah=[n1_1,n1_2,n1_3,n1_4;n2_1,n2_2,n2_3,n2_4;n3_1,n3_2,n3_3,n3_4]; for l=1:3 for k=1:4 if spread_ubah(l,k)<1 spread_ubah(l,k)=-1; else spread_ubah(l,k)=1; end end end demod_kanalI11=str2double(get(handles.edit134,'string')); demod_kanalQ11=str2double(get(handles.edit138,'string')); demod_kanalI12=str2double(get(handles.edit136,'string')); demod_kanalQ12=str2double(get(handles.edit141,'string')); demod_kanalI21=str2double(get(handles.edit135,'string')); demod_kanalQ21=str2double(get(handles.edit139,'string')); demod_kanalI22=str2double(get(handles.edit137,'string')); demod_kanalQ22=str2double(get(handles.edit140,'string')); transmisi=[demod_kanalI11,demod_kanalQ11,demod_kanalI12,demod_kanalQ12;... demod_kanalI21,demod_kanalQ21,demod_kanalI22,demod_kanalQ22] data_proses=-1*transmisi' nUsers=3; b_kluaran_MF=zeros(nUsers,2); for index=1:nUsers b_kluaran_MF(index,:)=(spread_ubah(index,:)*data_proses)/length(spread_ubah) end R=zeros(nUsers,1); for index=1:nUsers R(index) = sum(spread_ubah(1,:).*spread_ubah(index,:)) end R=R/max(R); R=toeplitz(R); b=b_kluaran_MF; y=R*b; Q=R; q=y; estimasi_output=y;

set(handles.edit178,'string',sprintf('%0.3f',(estimasi_output(1,1)))); set(handles.edit181,'string',sprintf('%0.3f',(estimasi_output(1,2)))); set(handles.edit179,'string',sprintf('%0.3f',(estimasi_output(2,1)))); set(handles.edit182,'string',sprintf('%0.3f',(estimasi_output(2,2)))); set(handles.edit180,'string',sprintf('%0.3f',(estimasi_output(3,1)))); set(handles.edit183,'string',sprintf('%0.3f',(estimasi_output(3,2)))); for l=1:3

for m=1:2 if (y(l,m)<-0.5) decis(l,m)=-1 elseif(y(l,m)>0.5)

set(handles.edit166,'string',decis(1,1)); set(handles.edit169,'string',decis(1,2)); set(handles.edit167,'string',decis(2,1)); set(handles.edit170,'string',decis(2,2)); set(handles.edit168,'string',decis(3,1)); set(handles.edit171,'string',decis(3,2)); for i=1:3 for j=1:2 if estimasi_output(i,j)>0 konversi_bit(i,j)=1; else konversi_bit(i,j)=0; end end end

set(handles.edit184,'string',konversi_bit(1,1)); set(handles.edit187,'string',konversi_bit(1,2)); set(handles.edit185,'string',konversi_bit(2,1)); set(handles.edit188,'string',konversi_bit(2,2)); set(handles.edit186,'string',konversi_bit(3,1)); set(handles.edit189,'string',konversi_bit(3,2));

% hObject handle to pushbutton19 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % --- Executes on button press in pushbutton20.

function pushbutton20_Callback(hObject, eventdata, handles)

set(handles.uipanel48,'visible','off');set(handles.uipanel42,'visible','on'); set(handles.uipanel85,'visible','off');set(handles.uipanel38,'visible','on'); set(handles.uipanel69,'visible','off');set(handles.uipanel39,'visible','on'); set(handles.uipanel68,'visible','off');set(handles.uipanel40,'visible','on'); set(handles.uipanel50,'visible','off');set(handles.uipanel1,'visible','on');

% hObject handle to pushbutton20 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

function edit166_Callback(hObject, eventdata, handles)

% hObject handle to edit166 (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 edit166 as text

% str2double(get(hObject,'String')) returns contents of edit166 as a double

% --- Executes during object creation, after setting all properties.

function edit166_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit166 (see GCBO)

if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');

end

function edit167_Callback(hObject, eventdata, handles)

% hObject handle to edit167 (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 edit167 as text

% str2double(get(hObject,'String')) returns contents of edit167 as a double

% --- Executes during object creation, after setting all properties.

function edit167_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit167 (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

function edit168_Callback(hObject, eventdata, handles)

% hObject handle to edit168 (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 edit168 as text

% str2double(get(hObject,'String')) returns contents of edit168 as a double

% --- Executes during object creation, after setting all properties.

function edit168_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit168 (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

function edit169_Callback(hObject, eventdata, handles)

% hObject handle to edit169 (see GCBO)

Dokumen terkait