필터 지우기
필터 지우기

error index exceeds matrix dimension. I am not using matrix

조회 수: 1 (최근 30일)
Muhammad Salahul Din
Muhammad Salahul Din 2017년 12월 4일
댓글: Sunny Katyara 2019년 4월 8일
syms th d alpha a th1 th2 l1 l2 lc1 lc2 I1z I2z m1 m2
d(1,1)=m1*lc1^2+m2*(l1^2+lc2^2+2*lc2*l1*cos(th2))+I1z+I2z;
d(1,2)=m2*(lc2^2+l1*lc2*cos(th2))+I2z;
diff(d(1,2),th(1))+diff(d(1,1),th(2))
Index exceeds matrix dimensions.

채택된 답변

KSSV
KSSV 2017년 12월 4일
syms th d alpha a th1 th2 l1 l2 lc1 lc2 I1z I2z m1 m2
d(1,1)=m1*lc1^2+m2*(l1^2+lc2^2+2*lc2*l1*cos(th2))+I1z+I2z;
d(1,2)=m2*(lc2^2+l1*lc2*cos(th2))+I2z;
diff(d(1,2),th1)+diff(d(1,1),th2)
It should be th1 and th2 not th(1), th(2)
  댓글 수: 3
Muhammad Salahul Din
Muhammad Salahul Din 2017년 12월 4일
I am trying to find out christoffel symbols
Sunny Katyara
Sunny Katyara 2019년 4월 8일
Dear Muhammad Salahul Din, did you find the christoffel symbols? Can you share the code here Please?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numbers and Precision에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by