フィルターのクリア

DH-Parameters; how to transform sym 4x4 into numeric matrix?

2 ビュー (過去 30 日間)
moinmoinnoob69
moinmoinnoob69 2022 年 11 月 22 日
コメント済み: moinmoinnoob69 2022 年 11 月 22 日
Hi guys and girls,
Sry I'm pretty new to MatLab and that seems to be such a basic question and i searched for it in some answered questions, but it didn't work out for me.
So i have this 4x4 symbolic matrix(T0FM) which includes q1(t)... q6(t) which are all sym... looks like that below
I tried it like that, but it doesnt work:
q0num = [0;-pi/2; pi/2;0;0;0];
qd0num = zeros(6,1);
qvec_sym = sym('qsym',[6 1],'real');
qdvec_sym = sym('qdsym',[6 1],'real');
T0FM_num= subs(T0FM,[qvec_sym; qdvec_sym],[q0num;qd0num])
T0FM_num= double(T0FM_num)
Thanks!
  1 件のコメント
moinmoinnoob69
moinmoinnoob69 2022 年 11 月 22 日
I think i got it
that qvec_sym and qdevec_sym are nonsense!
it now works with:
q = transpose(arrayfun(@(N) str2sym(sprintf('q%d(t)',N)), 1:6));
qd = transpose(arrayfun(@(N) str2sym(sprintf('q%dd(t)',N)), 1:6));
and fill those in instead of qvec and qdvec
_____________________________________
Can someone prove, that the new T0FM_num is the right Matrix?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by