Create an array containing numeric and symbolic variables
1 次查看(过去 30 天)
显示 更早的评论
I am trying to create an array that contains both numeric and symbolic variables. I need both as certain values will be tested if they are symbolic or not using isnumeric(); however, when trying to test these values they all come back as symbolic, is there a way around this? Code below:
syms t1 t2 d;
DH = [0 0.4 0 t1 %i = 1
0 0.1 -90 t2 %i = 2
0 d 90 0]; %i = 3
Thanks!
0 个评论
采纳的回答
Kevin Holly
2021-11-24
syms t1 t2 d;
DH = {0 0.4 0 t1 %i = 1
0 0.1 -90 t2 %i = 2
0 d 90 0} %i = 3
isnumeric(DH{1,1})
isnumeric(DH{1,4})
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!