Difference between revisions of "Soal A"
Dikaauliady (talk | contribs) |
Dikaauliady (talk | contribs) |
||
Line 36: | Line 36: | ||
T=np.dot(A,x) | T=np.dot(A,x) | ||
print ('matrix T', T) | print ('matrix T', T) | ||
+ | |||
+ | Penjelasan singkat : | ||
+ | |||
+ | https://youtu.be/fHKxJAJnNBE |
Revision as of 12:40, 28 October 2019
import numpy as np import math
- 1. input massa
m1 = eval(input('massa kotak 1 adalah '))
m2 = eval(input('massa kotak 2 adalah '))
m3 = eval(input('massa kotak 3 adalah '))
m4 = eval(input('massa kotak 4 adalah '))
- 2. input nilai percepatan dan sudut
a = eval(input('percepatan sebesar '))
alfa = eval(input('besar sudutnya adalah ')) sinteta = round( math.sin(math.radians(alfa)),2)
g = 9.8
- 2. definisi matriks
x1 = x2 = x3 = (g*sinteta) - a
x4 = g + a
A = np.array ([[m1,0,0,0], [m1,m2,0,0], [m1,m2,m3,0], [0,0,0,m4]], float) x = np.array ([x1,x2,x3,x4], float)
n = len(A)
print ('matriks A :', '\n', A) print ('matriks x :', '\n',x)
- 3. Nilai Tegangan
T=np.dot(A,x) print ('matrix T', T)
Penjelasan singkat :