Created
May 21, 2012 22:36
-
-
Save sakti/2765140 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from pylab import * | |
from numpy import * | |
banyakAngka = 0 | |
baris = "null" | |
angka = [] | |
normal = [] | |
data = open("/home/diean/haha/baru.txt", "r").readlines() | |
data = filter(lambda x: x.strip() != '', data) | |
data = map(lambda x: float(x), data) | |
# disini baris masih sama dengan "null" jadi block while dilewati | |
while (baris != "null" ): | |
baris = data.readline() | |
angka[banyakAngka] = baris | |
sudut = banyakAngka * 10 | |
normal[banyakAngka] = angka[banyakAngka] - angka[0] | |
polar(sudut, normal[banyakAngka]) | |
banyakAngka = banyakAngka + 1 | |
title('Plotting Data Manual Antena Wajanbolic') | |
show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment