Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
moinmoinnoob69
moinmoinnoob69 el 22 de Nov. de 2022
Comentada: moinmoinnoob69 el 22 de Nov. de 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 comentario
moinmoinnoob69
moinmoinnoob69 el 22 de Nov. de 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?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by