Effacer les filtres
Effacer les filtres

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

2 vues (au cours des 30 derniers jours)
moinmoinnoob69
moinmoinnoob69 le 22 Nov 2022
Commenté : moinmoinnoob69 le 22 Nov 2022
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 commentaire
moinmoinnoob69
moinmoinnoob69 le 22 Nov 2022
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?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by