problem with determinant calculus
1 回表示 (過去 30 日間)
古いコメントを表示
i've a problem in the calculus of the determinant of a matrix, which his components change in the time, the determinant calculated in the analytic way and with 'det' function results different.
function [w1,w]=singular5(q1,q2,t)
time=size(t);
time=time(2);
w=zeros(1,time);
w1=zeros(1,time);
for k=1:time
J=[-(sin(q1(k)+sin(q1(k)+q2(k)))) -sin(q2(k)) 0 0;-(cos(q1(k)+cos(q1(k)+q2(k)))) -cos(q2(k)) 0 0;0 0 1 0;1 1 0 1];
w1(k)=abs(sin(q1(k)-q2(k))+sin(q1(k)));
w(k)=abs(det(J));
end
% code
w1 and w result differnet!
2 件のコメント
Aveek Podder
2018 年 2 月 20 日
Hi,
Hope this helps:
function [w1,w]=singular5(q1,q2,t)
time=size(t);
time=time(2);
w=zeros(1,time);
w1=zeros(1,time);
for k=1:time
J=[-(sin(q1(k))+sin(q1(k)+q2(k))) -sin(q2(k)) 0 0;-(cos(q1(k))+cos(q1(k)+q2(k))) -cos(q2(k)) 0 0;0 0 1 0;1 1 0 1];
w1(k)=abs(sin(q1(k)-q2(k))+sin(q1(k)));
w(k)=abs(det(J));
end
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!