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

Kamis, 08 September 2011

Website Komunitas Fixie



Death-pedal.com adalah salah satu website dari sebuah komunitas fixie yang sudah cukup terkenal dan sering mengikuti lomba dalam ruang lingkung internasional dan sering menjadi model sebuah iklan dari brand sepeda yang sudah terkenal pula. Dalam web ini warna yang dipilih oleh desainer sangat lembut, tetapi kesan dari urban lifestyle cukup terasa dari font-font yang dipilih.


Dalam web ini kita dapat melihat flyer (pamflet) event-event yang diadakan oleh brand sepeda atau komunitas itu sendiri. Tak hanya flyer (pamflet) saja, tetapi video dari kegiatan komunitas dan video dari event atau kegiatan yang di ikuti oleh komunitas tersebut. Tampilan yang dibuat sangat bagus untuk menarik perhatian bagi yang melihatnya, khususnya bagi para pecinta sepeda.

Berikut adalah salah satu contoh video dari komunitas tersebut: