Extracting symbolic values from symbolic matrix
8 次查看(过去 30 天)
显示 更早的评论
I have a long code which has syms like q1(t) q2(t) ...
I have a 3x1 matrix which is in format like: n1=a1*q3(t)
a2*sin(q2(t)
0
How can i call the second row? Because when i try to call it like n1(2,1), algorithm perceive it as i attend a value to t.
0 个评论
采纳的回答
Torsten
2023-1-12
syms t q2(t) q3(t) a1 a2
n1 = [a1*q3(t);a2*sin(q2(t));0];
n1(2,1) % extract element (2,1)
n1(2,:) % extract complete 2nd row
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!