This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Jumat, 20 Maret 2020

APLIKASI THRESHOLDING 

TUGAS DWIKI WACHYU AJI NPM 17100104




pushbutoon1 open image

[name_file1,name_path1] = uigetfile(...
    {'*.bmp;*.jpg;*.tif','File of type (*.bmp,*.jpg,*.tif)';
    '*.bmp','File Bitmap (*.bmp)';...
    '*.jpg','File jpeg (*.jpg)';
    '*.tif','File Tif (*.tif)';
    '*.*','All File (*.*)'},...
    'Open Image');

if ~isequal (name_file1,0)
    handles.data1 = imread(fullfile(name_path1,name_file1));
    guidata(hObject,handles);
    axes(handles.axes1);
    imshow(handles.data1);

else
    return;
end

pushbutoon greyscale

image1 = handles.data1;
gray = rgb2gray(image1);
axes(handles.axes2);
imshow(gray);
handless.data2 = gray;
guidata(hObject,handles);

slider

gray = handles.data1;
value = get(handles.slider1,'value');
thresh = imcomplement(im2bw(gray,value/255));
axes(handles.axes2);
imshow(thresh);
handles.data3 = thresh;
guidata(hObject,handles);
set(handles.edit1,'string',value)

pushbutoon save

thresh = handles.data3;
[name_file_save,path_save] = uiputfile(...
{'*.bmp','File Bitmap (*.bmp)';...
 '*.jpg','File jpeg (*.jpg)';
 '*.tif','File Tif (*.tif)';
 '*.*','All File (*.*)'},...
 'Save Image');

if ~isequal(name_file_save,0)
    imwrite(thresh,fullfile(path_save,name_file_save));

else
    return
end

pusbutoon exit

close;


ini hasil dari program tersebut :




Rabu, 13 Desember 2017

TUGAS 3.8

Private Sub Command1_Click()
Dim a As String
a = Mid(Text2, 1, 4)
If a = "2009" Then
Text6 = "2009"
End If
a = Mid(Text2, 5, 1)
If a = "A" Then
Text7 = "Manajer"
Text3 = "A"
Text9 = "4000000"
Text10 = "1025000"
ElseIf a = "B" Then
Text7 = "Ka. Seksi"
Text3 = "B"
Text9 = "3500000"
Text10 = "975000"
ElseIf a = "C" Then
Text7 = "Staff"
Text3 = "C"
Text9 = "3000000"
Text10 = "925000"
End If
a = Mid(Text2, 7, 1)
If a = "S" Then
Text4 = "S"
Text5 = "Single"
ElseIf a = "M" Then
Text4 = "M"
Text5 = "Menikah"
ElseIf a = "J" Then
Text4 = "J"
Text5 = "Janda"
ElseIf a = "D" Then
Text4 = "D"
Text5 = "Duda"
End If
a = Mid(Text2, 9, 3)
If a = "KEU" Then
Text8 = "Accounting"
ElseIf a = "ADM" Then
Text8 = "Administrasi"
ElseIf a = "SDM" Then
Text8 = "General Affair"
ElseIf a = "EDP" Then
Text8 = "IT Unit"
ElseIf a = "SPM" Then
Text8 = "Security"
End If
Text11 = Val(Text9) + Val(Text10)
End Sub

Private Sub Command2_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text7 = ""
Text8 = ""
Text9 = ""
Text10 = ""
Text11 = ""
End Sub

Private Sub Command3_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text7 = ""
Text8 = ""
Text9 = ""
Text10 = ""
Text11 = ""
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub


TUGAS 3.7



Private Sub Command1_Click()
Dim A As String
A = Mid(Text1, 1, 3)
If A = "SIM" Then
Text2 = "Sistem Informasi Manajemen"
Text3 = "Fadiya Ulfa"
Text6 = "75900"
ElseIf A = "EDP" Then
Text2 = "Elektronik Data Proseccing"
Text3 = "Nurul Agustina"
Text6 = "62000"
ElseIf A = "MNJ" Then
Text2 = "MANAJEMEN"
Text3 = "Rian Hidayat"
Text6 = "42000"
ElseIf A = "CDR" Then
Text2 = "Corel Draw"
Text3 = "Siti Nur Khotima"
Text6 = "53000"
ElseIf A = "RPL" Then
Text2 = "Rekayasa Perangkat Lunak"
Text3 = "Winda Erlianti"
Text6 = "83000"
End If
A = Mid(Text1, 5, 2)
If A = "09" Then
Text4 = "2009"
ElseIf A = "10" Then
Text4 = "2010"
ElseIf A = "11" Then
Text4 = "2011"
ElseIf A = "12" Then
Text4 = "2012"
ElseIf A = "13" Then
Text4 = "2013"
End If
A = Mid(Text1, 8, 1)
If A = "A" Then
Text5 = "Andi Offset Yogyakarta"
ElseIf A = "I" Then
Text5 = "Indah Surabaya"
ElseIf A = "S" Then
Text5 = "Salemba Empat"
ElseIf A = "E" Then
Text5 = "Elek Media Komputindo"
ElseIf A = "M" Then
Text5 = "Maxicom"
End If
End Sub

Private Sub Command2_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
End Sub

Private Sub Command3_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
End Sub


Private Sub Command4_Click()
Unload Me
End Sub

TUGAS 3.6



Private Sub Cmdkeluar_Click()
Unload Me
End Sub

Private Sub Cmdlagi_Click()
Textkt = ""
Textjk = ""
Textht = ""
Textjb = ""
Textjt = ""
Texttotalp = ""
End Sub

Private Sub Cmdproses_Click()
Dim a As String
a = Mid(Textkt, 1, 3)
If a = "BIM" Then
Textjk = "BIMA"
Textht = "50000"
Textjb = "16.00"
End If
If a = "EKO" Then
Textjk = "EKONOMI"
Textht = "35000"
Textjb = "19.00"
End If
If a = "MUT" Then
Textjk = "MUTIARA"
Textht = "23000"
Textjb = "17.00"
End If
If a = "SEN" Then
Textjk = "SENJA"
Textht = "15000"
Textjb = "20.00"
End If
Textjt.SetFocus
End Sub

Private Sub Textjt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Texttotalp = Val(Textjt) * Val(Textht)
End If
End Sub

TUGAS 3.5



Private Sub Form_Load()
Combo1.AddItem "A-SIM-01"
Combo1.AddItem "I-EDP-02"
Combo1.AddItem "S-MNJ-03"
End Sub


Private Sub Cmdproses_Click()
Dim A As String
A = Mid(Combo1, 1, 1)
If A = "A" Then
Text4 = "Abdi Offsyet Yogyakarta"
End If
A = Mid(Combo1, 3, 3)
If A = "SIM" Then
Text1 = "Sistem Informasi Manajemen"
Text2 = "Yati Nur Oktavia"
Text5 = "75900"
End If
A = Mid(Combo1, 7, 2)
If A = "01" Then
Text3 = "2001"
End If
A = Mid(Combo1, 1, 1)
If A = "I" Then
Text4 = "Indah Surabaya"
End If
A = Mid(Combo1, 3, 3)
If A = "EDP" Then
Text1 = "Electronik Data Processing"
Text2 = "Imam Tarmizi"
Text5 = "62000"
End If
A = Mid(Combo1, 7, 2)
If A = "02" Then
Text3 = "2002"
End If
A = Mid(Combo1, 1, 1)
If A = "S" Then
Text4 = "Salman Omah"
End If
A = Mid(Combo1, 3, 3)
If A = "MNJ" Then
Text1 = "MANAJEMEN"
Text2 = "Salman"
Text5 = "79000"
End If
A = Mid(Combo1, 7, 2)
If A = "03" Then
Text3 = "2003"
End If
End Sub

Private Sub Cmdlagi_Click()
Combo1 = ""
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
End Sub

Private Sub Cmdbatal_Click()
Combo1 = ""
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Combo1.SetFocus 
End Sub

Private Sub Cmdkeluar_Click()
Unload Me
End Sub

TUGAS 3.4

Private Sub CboKode_Click()
Dim s As String
s = Mid(CboKode, 7, 5)
 If s = "MC965" Then
 txtmerk = "Apple MacBook Pro MC965"
 Txths = "12800000"
 End If
 If s = "MC966" Then
 txtmerk = "Apple MacBook Pro MC966"
 Txths = "15800000"
 End If
 If s = "MC968" Then
 txtmerk = "Apple MacBook Pro MC968"
 Txths = "9900000"
 End If
 If s = "MC969" Then
 txtmerk = "Apple MacBook Pro MC969"
 Txths = "11900000"
 End If
 txtjj.SetFocus

End Sub

Private Sub Command1_Click()
txthp = Val(txtjj) * Val(Txths)
If txthp > 40000000 Then
txtdis = (0.15) * Val(txthp)
ElseIf txthp > 35000000 Then
txtdis = (0.1) * Val(txthp)
ElseIf txthp > 30000000 Then
txtdis = (0.05) * Val(txthp)
ElseIf txthp > 25000000 Then
txtdis = (0.01) * Val(txthp)
End If
Txttb = Val(txthp) - Val(txtdis)
 End Sub




Private Sub Command2_Click()
CboKode = ""
txtmerk = ""
Txths = ""
txtjj = ""
txthp = ""
txtdis = ""
Txttb = ""
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Form_load()
CboKode.AddItem "Apple MC965 MacBook Pro"
CboKode.AddItem "Apple MC966 MacBook Pro"
CboKode.AddItem "Apple MC968 MacBook Pro"
CboKode.AddItem "Apple MC969 MacBook Pro"
End Sub



TUGAS 3.3

Private Sub CmdBatal_Click()
Txtnama = ""
Txtnpm = ""
txtjur = ""
txtps = ""
txturut = ""
Txttm = ""
End Sub

Private Sub Cmdproses_Click()
Dim S As String
Txttm.Text = "20" & Left(Txtnpm, 2)
S = Mid(Txtnpm, 3, 1)
If S = "1" Then
txtjur = "Sistem Informasi"
txtps = "Diploma Dua"
ElseIf S = "2" Then
txtjur = "Manajemen Informatika"
txtps = "Strata Satu"
ElseIf S = "3" Then
txtjur = "Tehnik Informatika"
txtps = "Diploma Tiga"
ElseIf S = "4" Then
txtjur = "Manajemen & Komp. Akuntansi"
txtps = "Diploma Empat"
End If
txturut = Right(Txtnpm.Text, 4)
End Sub

Private Sub Cmdkeluar_Click()
Unload Me
End Sub


Private Sub Txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtnpm.SetFocus
End If
End Sub