How to Search Last Name using Matlab

It is a hard day, because I always sleep over the mid night. Ok, it’s about text mining. We want search from the data that has a particular family name, for example, may name, rahmadya trias handayanto. Ok, because our data usually cell type (for database), use this kind of data type:

name={‘rahmadya trias handayanto’}

We use symbol { for creating a cell type that we always find in table format. The logic for searching my lastname is by finding the last space. Try using the regular expression.

index=regexp(name,’ ‘)

Don’t forget to type space between ‘ because we want to search the index of space for name. Type celldisp(index) to see the content of index, because it is cell type. Many people have more than two names, with middle name. So we have to choose the biggest index using function max.


We have to convert the name into character if we want to present the last name using char function.



We use ‘+1’ because we don’t include space to our last name. You can see the instruction below, it is very easy.

Tentang rahmadya

I'm a simple man .. Lahir di Sleman Yogyakarta, 7 Juni 1976 PENDIDIKAN: TK : - (tidak ada TK di tj Priok waktu itu) SDN : Papanggo, Jakarta 83 - 89 SMPN : 129, Jakarta 89 - 92 SMAN : 8, Yogyakarta 92 - 95 Univ. : Fak. Teknik UGM, Yogyakarta 95 - 2001 Pasca. : Tek. Informatika STMIK Nusa Mandiri, Jakarta 2008 - 2010 Doctoral : Information Management Asian Institute of Technology, Thailand 2013 - 2018 PEKERJAAN: Tek. Komputer AMIK BSI Jakarta : 2002 - 2005 IT Danamon Jakarta : 2005 - 2008 Tek. Informatika STMIK Nusa Mandiri Jakarta : 2005 - 2008 Univ. Darma Persada Jakarta: 2008 - 2013 Fakultas Teknik Universitas Islam "45" Bekasi : 2008 - Skrg ( Homebase) Univ. Bhayangkara Jakarta Raya: 2018 - Skrg Univ. Nusa Putra Sukabumi: 2018 - Skrg
Pos ini dipublikasikan di Asian Institute of Technology, Decision Support System, Matlab. Tandai permalink.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:


You are commenting using your account. Logout /  Ubah )

Foto Google

You are commenting using your Google account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.