Replace the symbol with value ?
5 次查看(过去 30 天)
显示 更早的评论
Hello All i have program with the following
syms O1 L1; T1 = [cos(O1),0,sin(O1),0;sin(O1),0,-cos(O1),0;0,1,0,L1;0,0,0,1];
i need to run the program with the values L1=1; O1=0;
I have program to 5_DOF robotics arm and i need to check it with values so please help. thanks
1 个评论
Walter Roberson
2018-4-26
Duplicated by https://www.mathworks.com/matlabcentral/answers/397579-replace-the-symbolic-with-values
回答(1 个)
Star Strider
2018-4-26
The easiest way is simply to define the values before defining ‘T1’:
syms O1 L1
L1 = 1;
O1 = 0;
T1 = [cos(O1),0,sin(O1),0;sin(O1),0,-cos(O1),0;0,1,0,L1;0,0,0,1];
If you want to substitute them after defining ‘T1’, use the subs function.
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!