Effacer les filtres
Effacer les filtres

Finding the Position Vector and Metric Tensor

2 vues (au cours des 30 derniers jours)
Philosophaie
Philosophaie le 2 Juil 2013
syms ax ay a vx vy vz x0 y0 z0
a=[ax ay az]
v=[vx vy vz]
r=[x0 y0 z0]
x=sym(zeros(4))
dx=sym(zeros(4))
g_ab=sym(zeros(4,4))
gupab=sym(zeros(4,4))
x=[t a(1)/2*t^2+v(1)*t+r(1) a(2)/2*t^2+v(2)*t+r(2) a(3)/2*t^2+v(3)*t+r(3)]
dx=diff(x,t)
for b=1:4
for a=1:4
g_ab(a,b)=-(dx(a))^-1*(dx(b))^-1
end
end
gupab = inv(g_ab)
Error code:
??? Error using ==> sym.inv
Error, (in inverse) singular matrix
Error in ==> PositionVector at 21
gupab = inv(g_ab)

Réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by