필터 지우기
필터 지우기

Finding the Position Vector and Metric Tensor

조회 수: 2 (최근 30일)
Philosophaie
Philosophaie 2013년 7월 2일
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