Hi, I can't understand why my code doesn't work. The problem is the matrix J, the code can't calculate the Det and the inverse. The det ll be -0.45cos... but it prints 0.-0.45cos..... can someone help me??
n = Real;
p1[s_, \[Theta]3_] = ( {
{\[Theta]3},
{s}
} );
p1[n] = ( {
{\[Theta]3},
{s}
} );
\[CapitalDelta]\[Theta] = 10*Pi/180;
l2 = 0.20;
l3 = 0.45;
\[Theta]1 = \[Pi];
n = 0;
\[Theta]2 = Pi/6;
\[Epsilon] = 0.00001;
\[Theta]2max = 2 Pi;
f1[p1[\[Theta]3_, s_]] =
s*Cos[\[Theta]1] + l2*Cos[\[Theta]2] + l3*Cos[\[Theta]3]
f2[p1[\[Theta]3_, s_]] =
s*Sin[\[Theta]1] + l2*Sin[\[Theta]2] + l3*Sin[\[Theta]3]
F1 = ( {
{f1[p1[\[Theta]3, s]]},
{f2[p1[\[Theta]3, s]]}
} );
p1[0] = ( {
{0},
{l2 + l3}
} );
MatrixForm[J[p1[\[Theta]3_, s_]] = ( {
{D[f1[p1[\[Theta]3, s]], s], D[f1[p1[\[Theta]3, s]], \[Theta]3]},
{D[f2[p1[\[Theta]3, s]], s], D[f2[p1[\[Theta]3, s]], \[Theta]3]}
} )]
ddet = Det[( {
{D[f1[p1[\[Theta]3, s]], s], D[f1[p1[\[Theta]3, s]], \[Theta]3]},
{D[f2[p1[\[Theta]3, s]], s], D[f2[p1[\[Theta]3, s]], \[Theta]3]}
} )]
M = MatrixForm[Inverse[J[p1[s, \[Theta]3]]]]