Difference between revisions of "Ramandika Garindra Putra"

From ccitonlinewiki
Jump to: navigation, search
(Riwayat Pendidikan)
(Soal B)
 
(34 intermediate revisions by the same user not shown)
Line 15: Line 15:
 
== Riwayat Pendidikan ==
 
== Riwayat Pendidikan ==
  
KB : Al Hanif Kemang Pratama
+
KB : Al Hanif Kemang Pratama (2001 - 2002)
TK : Al Azhar 24 Jatikramat
+
 
SD : Al Azhar 23 Jatikramat
+
TK : Al Azhar 24 Jatikramat (2002 - 2004)
SMP : Global Islamic School Condet
+
 
SMA : Al Azhar 4 Kemang Pratama
+
SD : Al Azhar 23 Jatikramat (2004 - 2010)
 +
 
 +
SMP : Global Islamic School Condet (2010 - 2013)
 +
 
 +
SMA : Al Azhar 4 Kemang Pratama (2013 - 2016)
 +
 
 +
PT : Teknik Mesin Universitas Indonesia (2016 - sekarang)
 +
 
 +
== KUIS (14 Oktober 2019) ==
 +
 
 +
==='''1. Problem Set 2.1 No. 6 hal. 55'''===
 +
 
 +
Solve the equations '''Ax = b''' by Gauss elimination, where
 +
 
 +
A =[[0,  0,  2,  1,  2],
 +
[0,  1,  0,  2, -1],
 +
[1,  2,  0, -2,  0],
 +
[0,  0,  0, -1,  1],
 +
[0,  1, -1,  1, -1]]
 +
 
 +
B =[1,  1, -4, -2, -1]
 +
 
 +
Matrix dikonfigurasi ulang
 +
 
 +
A = [[1, 2, 0, -2, 0], [0, 1, 0, 2, -1],[0, 1, -1, 1, -1], [0, 0, 0, -1, 1], [0, 0, 2, 1, 2]]
 +
 
 +
B = [-4, 1, -1, -2, 1]
 +
 
 +
Hasil operasi matrix
 +
 
 +
X1 = 2
 +
 
 +
X2 = -2
 +
 
 +
X3 = 1
 +
 
 +
X4 = 1
 +
 
 +
X5 = -1
 +
 
 +
'''Python'''
 +
 
 +
import numpy as np
 +
 
 +
#1. define matrix
 +
 
 +
A = np.array ([[0, 0, 2, 1, 2], [0, 1, 0, 2, -1],[1, 2, 0, -2, 0], [0, 0, 0, -1, 1], [0, 1, -1, 1, -1]], float)
 +
B = np.array ([[1], [1],[-4], [-2], [-1]], float)
 +
 
 +
n=len(A)
 +
 
 +
#2. eliminasi gauss
 +
 
 +
for k in range (0,n-1):
 +
    for i in range (k+1, n):
 +
        if A[i,k]! = 0 :
 +
            lam = A [i, k] / A [k, k]
 +
            A [i, k : n] = A [i, k : n] - ( A [k, k : n] * lam)
 +
            B[i] = B[i] - (B[k]*lam)
 +
 
 +
print ('matrix A:', '\n', A)
 +
print ('matrix B:', '\n', B)
 +
 
 +
#3. back subtitution
 +
 
 +
x = np.zeros(n,float)
 +
for m in range (n-1, -1, -1):
 +
    x[m]=(B[m]-np.dot(A[m, m+1:n], x[m+1:n]))/A[m,m]
 +
    print ('nilai X', m+1, '=', x[m])
 +
 
 +
 
 +
 
 +
 
 +
[[File:gauss.jpg]]
 +
 
 +
[[File:coding.jpg]]
 +
 
 +
==='''2. Problem Set 7.1 No. 1 hal. 263'''===
 +
 
 +
import numpy as np
 +
 
 +
def diff_y (x,y):
 +
    fungsi = x**2 - 4*y
 +
    return (fungsi)
 +
x = 0
 +
y = 1
 +
h = 0.01
 +
step_size = np.range (0,0.03,h)
 +
 
 +
for t in step_size:
 +
    k1 = diff_y (x,y)
 +
    k2 = diff_y ((x+0.5h),(y+0.05*k1*h)
 +
 
 +
    y = y + k1*h
 +
 
 +
print ('maka y(0.03) adalah', y)
 +
 
 +
 
 +
== UTS ==
 +
=== Soal A ===
 +
=== Soal B ===
 +
 
 +
import numpy as np
 +
 
 +
a = 10
 +
 
 +
b = 2
 +
 
 +
c = 2
 +
 
 +
def diff_y (t,v):
 +
    fungsi = a - b - c
 +
    return (fungsi)
 +
 
 +
v = 0
 +
 
 +
h = 1
 +
step_size = np.arange (0,10,h)
 +
 
 +
for t in step_size:
 +
    k1 = diff_y (t,v)
 +
    k2 = diff_y ((t+0.5*h), (v+0.5*k1*h))
 +
    k3 = diff_y ((t+0.5*h), (v+0.5*k2*h))
 +
    k4 = diff_y ((t+h), (v+k1*h))
 +
 
 +
    v = v + 1/6*(k1+2*k2+2*k3+k4)*h
 +
 
 +
    print ('maka v ketika 10 detik adalah', v)

Latest revision as of 15:12, 21 October 2019

Biodata

Nama : Ramandika Garindra Putra

NPM : 1606907625

Departemen : Teknik Mesin

Program Studi : Teknik Mesin

Biografi

Nama saya Ramandika Garindra Putra, orang - orang biasa memanggil Rama. Saya lahir di Jakarta 11 Agustus 1998. Saya berasal dari keluarga bersuku Sunda dan Jawa. Ayah saya keturunan Sunda yang lahir di Jakarta, dan Ibu saya keturunan Jawa yang lahir di Ponorogo. Saya merupakan anak pertama dari dua bersaudara, adik saya perempuan lahir di Jakarta tahun 2003.

Riwayat Pendidikan

KB : Al Hanif Kemang Pratama (2001 - 2002)

TK : Al Azhar 24 Jatikramat (2002 - 2004)

SD : Al Azhar 23 Jatikramat (2004 - 2010)

SMP : Global Islamic School Condet (2010 - 2013)

SMA : Al Azhar 4 Kemang Pratama (2013 - 2016)

PT : Teknik Mesin Universitas Indonesia (2016 - sekarang)

KUIS (14 Oktober 2019)

1. Problem Set 2.1 No. 6 hal. 55

Solve the equations Ax = b by Gauss elimination, where

A =[[0, 0, 2, 1, 2], [0, 1, 0, 2, -1], [1, 2, 0, -2, 0], [0, 0, 0, -1, 1], [0, 1, -1, 1, -1]]

B =[1, 1, -4, -2, -1]

Matrix dikonfigurasi ulang

A = [[1, 2, 0, -2, 0], [0, 1, 0, 2, -1],[0, 1, -1, 1, -1], [0, 0, 0, -1, 1], [0, 0, 2, 1, 2]]

B = [-4, 1, -1, -2, 1]

Hasil operasi matrix

X1 = 2

X2 = -2

X3 = 1

X4 = 1

X5 = -1

Python

import numpy as np

  1. 1. define matrix

A = np.array ([[0, 0, 2, 1, 2], [0, 1, 0, 2, -1],[1, 2, 0, -2, 0], [0, 0, 0, -1, 1], [0, 1, -1, 1, -1]], float) B = np.array ([[1], [1],[-4], [-2], [-1]], float)

n=len(A)

  1. 2. eliminasi gauss

for k in range (0,n-1):

   for i in range (k+1, n): 
       if A[i,k]! = 0 : 
           lam = A [i, k] / A [k, k]
           A [i, k : n] = A [i, k : n] - ( A [k, k : n] * lam)
           B[i] = B[i] - (B[k]*lam)

print ('matrix A:', '\n', A) print ('matrix B:', '\n', B)

  1. 3. back subtitution

x = np.zeros(n,float) for m in range (n-1, -1, -1):

   x[m]=(B[m]-np.dot(A[m, m+1:n], x[m+1:n]))/A[m,m]
   print ('nilai X', m+1, '=', x[m])



Gauss.jpg

Coding.jpg

2. Problem Set 7.1 No. 1 hal. 263

import numpy as np

def diff_y (x,y):

   fungsi = x**2 - 4*y
   return (fungsi)

x = 0 y = 1 h = 0.01 step_size = np.range (0,0.03,h)

for t in step_size:

   k1 = diff_y (x,y)
   k2 = diff_y ((x+0.5h),(y+0.05*k1*h)
   y = y + k1*h

print ('maka y(0.03) adalah', y)


UTS

Soal A

Soal B

import numpy as np

a = 10

b = 2

c = 2

def diff_y (t,v):

   fungsi = a - b - c
   return (fungsi)

v = 0

h = 1 step_size = np.arange (0,10,h)

for t in step_size:

   k1 = diff_y (t,v)
   k2 = diff_y ((t+0.5*h), (v+0.5*k1*h))
   k3 = diff_y ((t+0.5*h), (v+0.5*k2*h))
   k4 = diff_y ((t+h), (v+k1*h))
   v = v + 1/6*(k1+2*k2+2*k3+k4)*h
   print ('maka v ketika 10 detik adalah', v)