Minggu, 23 Oktober 2011

Menganalisis website www.indosat.com


A. Referensi

Berdasarkan website http://usabilitygeek.com sebagai referensi “search usability”. Terdapat 10 pedoman untuk mendesain antaramuka pencarian.

B. Analisis masalah

1. It must only consist of a text box and a button next to it.
Kesepakatan dalam membuat text dan tombol next untuk mesin pencari, hanya sebuah kotak untuk memasukkan keyword pencarian tombol untuk melakukan pencarian (button next). Berikut adalah contoh text box dari mesin pencari yang sudah terbiasa dipakai, disepakati, dan diterima oleh para user. Diambil dari situs Jacob Nielsen Useit.com.


Sedangkan tampilan mesin pencari yang terdapat pada website www.indosat.com kurang maksimal, atau belum mengacu pada 10 pedoman mendesain antarmuka pencarian. Berikut contoh tampilannya:

Ketika mencoba mencari kata “indosat” pada kotak pencarian, ternyata pada gambar kaca pembesar tersebut tidak dapat di klik. Sehingga kesalahan dilakukan ada pada bagian ini.



Karena kita ingin memulai pencarian kita harus menekan tombol “enter” pada keyboard. Pada mobile device akan sangat menyulitkan ketika menekan tombol “enter”, karena pada mobile device (handphone) “enter” digunakan untuk turun 1 spasi.

Sehingga tampilan untuk search box seharusnya seperti berikut:




2. It should be positioned on the top right hand area of your web site.
Posisi dari kotak pencarian adalah pojok kanan atas. Karena posisi yang paling memudahkan pengguna lihat ketika ingin menggunakan mesin pencari. Berikut contoh tampilan berdasarkan 10 pedoman mendesain antarmuka pencarian.


Sedangkan didalam website www.indosat.com, posisi search box sudah berada pada kanan atas, tapi kurang berada di bagian pojok.

3. It should be present on all of your web site’s page.
Ketika kita melakukan pencarian maka kotak pencarian (search box) masih terdapat pada halaman tersebut. Ini akan mempermudah user ketika akan mengganti keyword atau mencari informasi yang lain, user tidak perlu untuk kembali ke home page untuk melakukan pencarian.

4. it should not be accessible via a link to a “Search Page”.
Pengguna akan gagal untuk melihat link yang membawa mereka ke halaman pencarian. Selain itu, mereka mengharapkan antarmuka pencarian akan tersedia dari halaman saat ini. Ketika hasil pencarian tidak di temukan tidak muncul Search page yang menunjukkan bahwa informasi yang dicari tidak ditemukan. Pada website Indosat ini, tidak ditemukan kesalahan seperti ini.

5. It’s text box must accommodate long search phrases of approximately 20 characters.
Pembatasan dalam memasukkan keyword berguna untuk meminimalisir salah penulisan yang dilakukan oleh pengguna untuk menghasilkan informasi yang mereka cari.

Corkd.com adalah contoh yang baik untuk panjang karakter yang digunakan pada search box.


Dan berikut adalah contoh dari search box yang memakai karakter terlalu panjang. Bentuk ini tidak terlalu effisien, karena tidak terlalu memanfaat white space.


Pada website Indosat.com, space yang diberikan sebanyak 20 karakter, sesuai dengan pedoman yang ada.




6. It’s text box must be initially empty.
Menuliskan kata atau petunjuk “Search”, “Type Your Text Here”, dan “Search Here” adalah hal yang menyalahin pedoman. Karena itu adalah hal yang tidak terlalu diperlukan, kebanyakan pengguna telah mengetahui bagaimana cara menggunakan search box.

Dan website Indosat.com juga melakukan kesalahan dalam membuat search box tersebut.



Dan berikut adalah tampilan yang seharusnya




7. It’s search button should be called “Search” that users dan click in order to search your site.
Label tombol pencarian seperti “Go”, “Cari”, “Enter”, atau “Cari Kata Kunci” atau ikon seperti kaca pembesar untuk melambangkan pencarian kurang bermanfaat daripada sebuah tombol yang disebut “Cari”. Berikut adalah contoh kesalahannya.




Dan pada website Indosat.com search button menggunakan lambang kaca pembesar, sebenarnya tidak menyalahi pedoman, karena jika lambang tersebut di peruntukkan sebagain tombol pencarian seperti pada gambar berikut.


8. It’s search button must be located to the right of the search text box.
Pengguna telah terbiasa dengan kesepakatan bahwa search button berada disebalah kanan dari search box. Jika para desainer web mengikuti pada pedoman tersebut maka akan user akan lebih mudah mengoperasikan antarmuka pencarian. Pada situs Indosat.com pedoman ini telah dipatuhi dengan benar.

9. It’s search mechanism should, by default, search your entire site.
Mekanisme ketika keyword dari pencarian yang pengguna ketik, apakah masuk kedalam semua kategori atau sub-menu yang ada dalam website tersebut. Pada website Indosat, hal ini di terapkan.




10. It’s search mechanism should not search outside your website.
Ketika pengguna mengetikkan keyword untuk mencari informasi, mekanisme pencarian pada website tersebut tidak boleh melakukan pencarian keluar dari website kita sendiri. Hal tersebut akan membuat pengguna meninggalkan website anda.

C. Daftar Pustaka

a. Misfud, Justin. 2011. “10 Usability Guidelines for Designing The Search Interface.” http://usabilitygeek.com/10-usability-guidelines-for-the-search-interface/ (22 oktober 2011)
b. Bustos, Linda. 2010. “11 tips for advanced search usability.” http://www.getelastic.com/advanced-search-usability/ (22 oktober 2011)

Top 10 Mistakes In Web Design


1. Pencarian yang buruk


Pencarian yang buruk search engine adalah ketika mesin pencari tersebut tidak dapat menangani kesalahan ketik, bentuk jamak, tanda hubung, dan varian lain. Sehingga bagi pengguna yang lanjut usia akan merasa kesulitan.



Keyword yang digunakan sebagai contoh adalah k
uote, tapi yang saya maksud disini adalah quote atau kutipan. Tapi yang muncul adalah nama ID dalam forum tersebut.




Hal ini juga akan mempersulit ketika seseorang lupa akan kata kunci yang sebenarnya ketika mereka mencari menggunakan search engine tersebut.


2. File PDF ketika membaca online
Ketika user sedang membaca / mencari sebuah artikel secara online, terkadang mereka merasa terusik ketika file-file PDF / mengunduh secara langsung (direct download) ketika user hanya ini membuka dan membaca link sebuah artikel.




3. Tidak mengganti warna link yang telah dikunjungi

Fitur dapat membantu user ketika mencari alamat suatu web, fitur sangat membantu untuk agar user tidak membuka alamat yang sama berkali-kali. Seperti contoh pada alamat website berikut yang tidak menggunakan fitur tersebut. Bukalapak.com



4. Non-Scannable text
Kesalahan pada search engine ini adalah terlalu banyak tulisan yang menyebabkan user susah untuk mendapatkan informasi yang dimaksud. Karena terkadang user sudah lebih dlu malas untuk membaca setiap kalimat dalam web tersebut.



5. Fixed font size
Sebuah alamat website yang tidak memberikan fitur untuk memperbesar / memperkecil ukuran font pada website tersebut, terkadang font yang kecil menyulitkan user untuk mencari informasi.



6. Halaman judul search engine dengan visibility rendah
Dalam www.bukalapak.com ini kesalahan pada judulnya, yaitu ketika user membuka tab baru dalam website tersebut. Maka, semua tab baru yang di buka akan menampilkan nama judul, tidak menampilkan judul informasi yang kita buka. Sehingga membingungkan user ketika ingin membuka kembali halaman yang dituju.


7. Semuanya terlihat seperti iklan
Pada sebuah pencarian dalam sebuah website, user hanya bertujuan untuk mendapatkan informasi yang mereka cari. Tapi terkadang dalam website tersebut terlalu banyak iklan yang di tampilkan. User akan meresa terlalu malas untuk memperhatikan iklan-iklan tersebut. Button menu pada sebuah website yang terlihat seperti iklan akan mengecoh user dalam mencari informasi yang di tuju atau button menu yang ketika di klik yang menampilkan iklan terlebih dahulu (pop-up) akan membuat user tidak merasa nyaman.





8. Melanggar Kesepakatan Desain
Desain dalam situs tersebut yang tidak konsisten, sehingga membuat user bingung ketika ingin mencari informasi. Situs tersebut sering berganti tampilan halaman dan terlihat seolah – olah pindah alamat website, sehingga membuat bingung user.



9. Membuka Window Browser Baru
Ketika user sedang mencari informasi, lalu mereka meng-klik sebuah menu dan muncul jendela halaman baru, hal itu akan membuat user merasa tidak nyaman. Karena mereka harus membuka kembali jendela-jendela sebelum. Dalam hal ini desainer mengabaikan fungsi tombol “back”. Para user akan merasa benci, bahkan kesal ketika mereka mendapati website dengan pop-up yang tidak beralasan. Ketika saya meng-klik artikel tentang laptop yang dijual, seketika itu muncul window baru yang berisi price list service laptop.



10. Tidak menjawab pertanyaan pengguna
Dalam penggunaan web, khusus nya search engine. Tujuan dari seorang user adalah mendapatkan informasi atau bahkan membeli produk anda. Kegagalan sebuah web dalam membuat search engine adalah tidak memberikan informasi yang tepat kepada user. Salah satu contohnya adalah web penjualan yang tidak menyertakan harga barang yang mereka jual. Contoh website dalam kasus ini adalah http://h20424.www2.hp.com. Ketika mencari produk dari HP Compaq, tidak menampilkan harga dari produk tersebut.






Kamis, 29 September 2011

QR Code (Quick Response Code)

Kode QR atau biasa dikenal dengan istilah QR Code adalah bentuk evolusi kode batang dari satu dimensi menjadi dua dimensi. Penggunaan kode QR sudah sangat lazim di Jepang Hal ini dikarenakan kemampuannya menyimpan data yang lebih besar dari pada kode batang sehingga mampu mengkodekan informasi dalam bahasa Jepang sebab dapat menampung huruf kanji. Kode QR telah mendapatkan standarisasi internasional dan standarisasi dari Jepang berupa ISO/IEC18004 dan JIS-X-0510 dan telah digunakan secara luas melalui ponsel di Jepang



Kapasitas Data
Jumlah data yang dapat disimpan dalam kode QR tergantung pada set karakter, versi dan tingkat koreksi kesalahan. Nilai maksimum untuk versi 40 dengan kapasitas besar (Large Capacity) sebesar :


- Numeric only Max. 7,089 characters
- Alphanumeric Max. 4,296 characters
- Binary numeral system Binary 8 bits Max. 2,953 bytes
- Kanji / Kana Max. 1,817 characters






Cara penggunaan kode QR


Kode QR dapat digunakan pada ponsel yang memiliki aplikasi pembaca kode QR dan memiliki akses internet GPRS atau WiFi atau 3G untuk menghubungkan ponsel dengan situs yang dituju via kode QR tersebut. Pelanggan, yang dalam hal ini adalah pengguna ponsel hanya harus mengaktifkan program pembaca kode QR, mengarahkan kamera ke kode QR, selanjutnya program pembaca kode QR akan secara otomatis memindai data yang telah tertanam pada kode QR. Jika kode QR berisikan alamat suatu situs, maka pelanggan dapat langsung mengakses situs tersebut tanpa harus lebih dulu mengetikkan alamat dari situs yang dituju. Jika ingin mengakses kode QR dengan ponsel tanpa kamera, maka hal pertama yang harus dilakukan oleh pengguna adalah dengan menjalankan terlebih dahulu aplikasi peramban yang ada pada ponsel, lalu masukkan URL halaman yang bersangkutan, maka pengguna akan memperoleh konten digital yang diinginkan. Hal ini tentu mempermudah pelanggan dalam mendapatkan informasi yang ditawarkan oleh pemilik usaha. Jenis-Jenis aplikasi yang dapat membaca kode QR antara lain misalnya Kaywa Reader, yang dapat di instal pada ponselnokia,iMatrix, aplikasi untuk iPhone dan ZXing Decoder Online yang dapat digunakan untuk mendekode kode QR berupa imaji dengan memasukkan URL image maupun dengan menguploadnya.

Kelebihan QR Code
Kode QR memiliki kapasitas tinggi dalam data pengkodean, yaitu mampu menyimpan semua jenis data, seperti data numerik, data alphabetis, kanji,kana,hiragana,simbol,dan kode biner.Selain itu kode QR memiliki tampilan yang lebih kecil daripada kode batang. Hal ini dikarenakan kode QR mampu menampung data secara horizontal dan vertikal, oleh karena itu secara otomatis ukuran dari tampilannya gambar kode QR bisa hanya seperspuluh dari ukuran sebuah kode batang. Tidak hanya itu kode QR juga tahan terhadap kerusakan, sebab kode QR mampu memperbaiki kesalahan sampai dengan 30%. Oleh karena itu, walaupun sebagian simbol kode QR kotor ataupun rusak, data tetap dapat disimpan dan dibaca. Tiga tanda berbentuk persegi di tiga sudut memiliki fungsi agar simbol dapat dibaca dengan hasil yang sama dari sudut manapun sepanjang 360 derajat.


Berikut adalah situs yang memberikan jasa QR Code generator :

Dan berikut adalah contoh konten informasi penulis yang ubah menjadi QR Code

Contoh hasil encode :



Implementasi dari QR code dapat diterapkan dalam E-KTP yang sekarang ini sedang di kembang kan ..

Jumat, 16 September 2011

Praktikum Anum Lecture 3

Matrix concatenations

Using the brackets we can create more and more complicated matrixs:


>> [ones(2,2) zeros(2,2)]

>> [ones(2,2) ; zeros(2,2)]


Exercise

  • Create the matrix whose first column is the numbers 1:10, the next column contains the first 10 squares 1, 4, 9 ...100 and the third column contains the first 10 powers of 2: 2 4 8 16...1024.

More Expressions

All Matlab expressions are made out of basic building blocks put together:

  • Constants
  • Variables
  • Operators
  • Keywords
  • Functions

Constants

We have met some constants already: 1, 3, 1.56, -5, pi. But there are more that we haven't yet met: i, j, (root of -1), 2.4e12 (2.4 times 10^12), 'a' (the character a), 'hello' (a vector consisting of the letters 'h','e','l','l','o'). Note that i and j can be used in a way different from variables: you can write 3i or -15j, but if you define a=10, writing 4a is an error... Also note that Matlab allow using the colon notation with letters: 'a':'z'.

Note that you can access letters in a string just elements in any other vector:

>> a='hello'

>> a(2)

>> a(4:5)='p!'

Exercise:

  • Create the string of letters 'zyx....cba'
  • Intertwine the two strings 'Hello!!' and 'Goodbye' (create the string 'HGeolold....!e')

Variables

There isn't much to say about variables. Variable names must start with a letter, and the variable name length must be no more than 32 characters. Names may use letters, numbers and the underscore '_'.


Note that matlab will make matrixs and vectors grow as needed (filling the empty spaces with zeros):

>> a = [1 2 ; 3 4]

>> a(5,5) = 1


Operators

We have met many operators: =,+,-,/,*,^,.,',[,],(,),;,:. There are a few others, as we shall see shortly.

Keywords

We have not yet seen many keywords...the only exception is end.

Functions

We have seen: ones, zeros, diag, size,...There are others. For example: sin, cos, exp, log, sqrt. You can also define new functions as we shall learn in the next lecture or two.

Plotting

Let's learn how to make nice pictures. plotting is one of the basic tools of Matlab. Most of the plotting happens through plot and its variants. Best is to learn by example:

>> x = 0:0.01:1 ;

>> y = sin(x) ;

>> plot(x,y)

Notice several things.

First, the semicolon ';' at the end of the expression suppresses the output of the result. However, it does not inhibit the evaluation of the expression. So x and y are still as they would be if the semicolon was missing but the screen is blissfully clean (try it without the semicolon).

Second, notice that the plot function created a nice figure for us, with the first "wave" of the sin. try it put with other functions.

Exercise:

  • Plot the sin over a different interval
  • Plot a more squiggily sin over the same interval
  • plot the function x^2 between the numbers -5 and 5
  • plot the function log(x) from 1 to 10 (be sure that your plots are nice and smooth)
  • plot a circle (think parametric plot)
  • plot a Lissajou curve
  • Plot a "heart" r = sin(theta/2)
  • Read more about plot and its optional arguments!


Note that using plot with only one input argument does something a little strange (but useful at times...).

Logical Constructs

Sometimes it is important to compare numbers. For example we might want to act differently if a given number is positive or negative. For this we need logical operators and comparisons.

Testing

First, comparisons. we use the operators ==, ~=, < >, <=, >= (the ~ key is usually at the top left of the keyboard, and it needs the SHIFT key) to compare numbers e.g:


>> 1==2

>> 3~=5

>> 5<=6

>> 7<=10


Notice that these expressions return 0 when they are false and 1 when the are true. This is the convention. 0 is false and 1 is true.

While this notation looks similar to math, there are a few pitfalls

  • 1 does NOT return what it does in math...in fact this will alway be true regardless of the value of x. Can you see why?
  • == is not =. Regardless of how many time I will say this, people will still make this mistake many times...but perhaps by saying it lots, it will happen less...maybe. remember...you have been warned...= is assignment, and == is a test for equality.


Boolean operations

What if we want to check two things? A and B? or perhaps A and (B or C)...for this we need Boolean operators: & (AND), | (OR), and ~(NOT)

(The | is usually found at the middle right of the keyboard, and it needs a SHIFT key.)

  • 1~=2 | 3<4
  • 3~=4 & 8==(4+4)
  • ~(2<=8)


Formatting Text

Once in a while we would like to display some text that is nicely formatted and not just the output as Matlab wants to display. To do this we use the sprintf command.

In its simplest form it is quite straightforward...the first arguemnt is a format string, and the rest are parameters for the string. examples:

  • sprintf('hello, here is a number %d',17)
  • sprintf('my name is %s and I am %g years old','Yossi',31)
Read up on sprintf to get the whole picture.

sumber : http://ocw-mit.dikti.go.id/OcwExport/Akamai/resources/farjoun/Lecture3.html

Praktikum Anum Lecture 2

Accessing Matrix Elements

Submatrices

We already say in the previous lecture that you can access the (2,3)th element of a matrix a with the notation

>> a(2,3)


This gives the entry of a in the second row and the third column.

We can also gain access to several elements at the same time. Try for example:


>> a(2, [1 2])

>> a([3 4], 3)

>> a([2 3], [3 4])


These commands extract a submatrix of a with the corresponding set of rows and columns.


It is often useful to extract a whole row or column of a given matrix. Assuming that B has 10 rows, we can extract the second column of B with the command


>> B(2,1:10)


Using the column notation instead of spelling out [1 2 3 4 5 6 7 8 9 10].

In fact, there is more shorthand to be learned here. First, we can replace the 10 with the keyword end:


>> B(2,1:end)


This keyword gets replaced by the largest number allowed for that place. So if it is used in the rows it will be replaced wit the number of rows, if in the columns, with the number of columns. It is useful to know that one can manipulate it as one would any other variable:


>> B(2,1:end-1)

>> B(2,1:end/2)


Of course, if by the manipulation you get an illegal expression, matlab will complain:

>> B(2,1:end+1)

>> B(2,sin(end):end)


The 1:end construction is so useful that Matlab has a further shorthand for it:


>> B(2,:)

Means the same as B(2,1:end). So, one should think of the bare colon (:) as meaning "everything".


Non-contiguous element access

The elements of the matrix that we access do not have to be contiguous:

>> a(3,[2 4 6])

>> a([2 4], [1 3])


They don't have to be in increasing order:

>> a(3,[2 6 4])

>> a([4 1], [3 2])


Nor do they have to only appear once:

>> a(3,[2 2 4 4 1 1 1])

>> a(3*ones(1,3),2*ones(1,10))

Exercises:

  • Verify that the sum along the anti-diagonal of the magic matrix is also the same as all the other rows, cols and the diagonal. (Hint: you can first change the order of the rows or columns before taking the diag)
  • If A is a matrix, how can you get the sub-matrix of elements whose
    both coordinates are odd?
  • Let x = [2 5 1 6] and y = [4 2 1 3]. Think of y as a specific reordering of the numbers 1:4. Use y to reorder x in the same fashion.
  • Given a ``permutation'' vector as y is in the previous item. Find the vector which gives the inverse of the permutation! (Tricky!)
  • Given two permutations p and q, find the permutations that is the same as p(q(s)) (that is it permutes the set s as if you would first permute with q and then with p)


Assigning into submatrices

Just as in the reference and assignment of single numbers into matrices, we can also assign new values into complete submatrices. The only thing that needs to be checked is that the matrix on the right of the equal sign has the same dimension as the matrix referenced on the left:


>> a([2 3],[1 4]) =[1 2 ;3 4]

>> a(1,1:4)=2:5


Scalar expansion

Matlab has a nice time-saving notation. If an operator requires a matrix of a known size and instead is given a scalar (i.e a number). It "expands" the scalar into a full matrix of the required size. This is quite cumbersome to say...much better to show examples:


>>1:10.^2

>>2.^1:10

>>[1 2; 3 4] + 5


In these three cases, the relevant operator is looking for a matrix of the same size as the one it already has on the other side, but instead it finds a number. So Matlab pretends as if the matrix of the expected size is there with each of its entries equal to the number.


Exercises

  • Write an expression for the sum of the integers from 1 to 100
  • Write an expression for the sum of the squares of the numbers from 1 to 10
  • Write an expression for the sum of the powers of 0.5 to the numbers from 1 to 10
  • Let x = [2 5 1 6]. Add 3 to just the odd-index elements (resulting in a 2-vector), adds 3 to them and puts the result in the even positions of the original vector (overwriting the 2 and the 1).

sumber : http://ocw-mit.dikti.go.id/OcwExport/Akamai/resources/farjoun/Lecture2.html

Praktikum Anum

Lecture 1

Lecture 1

Getting Matlab to run

On your own laptop...you're on your own...

On Athena type (without the athena% prompt)

athena% add matlab
athena% matlab

It takes about 30-60 secs to start up... and you'll get a screen
showing:

< M A T L A B >
Copyright 1984-2006 The MathWorks, Inc.
Version 7.2.0.283 (R2006a)
January 27, 2006


To get started, type one of these: helpwin, helpdesk, demo,
help help, whatsnew, info
For Athena-specific information, type: help athena
For product information, visit www.mathworks.com

To start the Matlab Desktop, type: desktop

>> desktop

Alternatively, you can type


athena% add matlab
athena% matlab -desktop

Programming

The most awful truth about computers is that they are all dumb. Everything must be explicitly told. Spelling out the most minor and obvious detail. Otherwise, you will either get a syntax error (computer not understanding what you are saying) or a programming error (the computer understanding what you are saying but it is different from what you mean).


There are many programing languages. Why use Matlab? As a first programming language, it is great, it has simple syntax, it is easy to get started with and easy to do graphics. While other programming languages are faster running they are slower to learn and to use.
In addition, Matlab, as an interpreted language, is interactive, which allows for more exploratory programming. Once the exploration is done, one should consider rewriting the program in a different language if intensive use is required.

The Command Prompt

In the interactive terminal of Matlab you will see the command prompt (>>). This is Matlab's way of telling you that it is ready to receive instructions from you. To command Matlab, type your request and hit Enter. Matlab then evaluates your command and displays the output (if any).

To get help use the help, and lookfor commands. help should be used to find out information about a known command, e.g. help zeros.
lookfor can be used to find a command to perform a task e.g. lookfor roots.

If you do not get the command prompt for some reason, you may have typed a syntax error, or have put Matlab into an infinite loop. Don't panic! press Ctrl-C and you'll get the prompt back.

Exercises

  • Learn about the commands ones, zeros, sum, and diag.
  • Learn about magic and verify what you learned with sum.


Simple Expressions

Matlab's most basic building blocks are expressions: 1, 1+1,4*3, 4^2, 5/6.
But Matlab's real strength is in handling matrices and vectors. To enter a vector we use brackets. Try the following examples to see what happens: [1 2], [1:10], [1, 2 3 4; 5 6, 7 8 ; 9 10 11 12]
Notice that the colon is used to create an arithmetic sequence. We can also create a sequence with a step-size different from 1: [4:0.1:5], [5:-2:-5].

To transpose a matrix (or vector) use the apostrophe ('):


>> [1:10]'

Exercises


Try to solve these with a single Matlab command:

  • Create the vector consisting of the whole even numbers between 15 and 27.
  • Create the vector consisting of the whole odd numbers between 15 and 27.
  • Create the vector of the previous question in decreasing order.

Variables

Asking Matlab to calculate things for us is great, but most of the times a calculation is only one step out of many and the result of a calculation need to be saved for the (very near) future. To do this we use 'variables', which are simply a way to name a bit of Matlab data. This is best explained by example:


>> a=1


puts the value 1 into a variable called a. typing

>> a


results back in the value 1.


We can also assign a calculation into a variable:


>> b=1+1

and now b will contain the answer, 2.


Variable names can (and should) be longer than one letter. A word or a couple of words strung together tends to work the best.

Referencing matrix elements

We can access the elements of a matrix in the following manner:

>> a=[1 4 3 5 6]

>> a(4)

>> b=[1 2 ; 3 4]

>> b(2,2)


Where the numbers in the parenthesis are (row, column).


Sumber : http://ocw-mit.dikti.go.id/OcwExport/Akamai/resources/farjoun/Lecture1.html


Tugas Anum

1. sigma i=1 sampai 1000000 x = 0.35
2. sigma i=1 sampai 1000000 x = 0.25
3. 1000000/4 - sigma i=1 sampai 1000000 x = 0.25

Deadline Jum`at 23 September 2011

buat dalam 1 folder
>ilkom
>statistik

kirim ke e-mail : roni_wijaya45@yahoo.co.id

contoh codingan M-file

%program
sum = 0;
galatabsolut = 0;
galatrelatif = 0;
x = 0.1;
for i = 1:1000000
sum = sum + x;
end
galatabsolut=abs(sum - 100000)
galatrelatif=galatabsolut/100000

%program
sum = 0;
galatabsolut = 0;
galatrelatif = 0;
x = 0.2;
for i = 1:1000000
sum = sum + x;
end
galatabsolut=abs(sum - 200000)
galatrelatif=galatabsolut/200000