Created
May 7, 2019 15:35
-
-
Save fobos531/6e108f43f957872dd0013dc78ab4ff35 to your computer and use it in GitHub Desktop.
This file contains 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
import platform | |
import numpy as np | |
import numpy.linalg as LA | |
import sympy as sp | |
sp.init_printing() | |
#slozi STANDARNU BAZU | |
#T1=sp.Matrix([[]]) | |
#koordinate vektora zadanog Pk | |
Pk=sp.Matrix([1,3,-5]) | |
#slozi BAZU KOJA JE ZADANA - MATRICA PRIJELAZA | |
#PISI PO REDU | |
T2=sp.Matrix([[0,1,2],[1,0,0],[1,1,0]]) #dva closing angle bracketa mora biti | |
T2=T2.T | |
print("Matrica prijelaza") | |
print(T2) | |
#invertiraj | |
T2=T2.inv() | |
print("Inverzna matrica") | |
print(sp.N(T2,8)) | |
#dobi koordinate u trazenoj bazi | |
PB2=T2*Pk | |
print("") | |
print("") | |
print("RJEŠENJE") | |
print(sp.N(PB2,8)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment