Finding the Position Vector and Metric Tensor

2 次查看(过去 30 天)
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)

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by