Filter löschen
Filter löschen

Replace the symbol with value ?

2 Ansichten (letzte 30 Tage)
Mohammed kandeel
Mohammed kandeel am 26 Apr. 2018
Kommentiert: Walter Roberson am 26 Apr. 2018
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 Kommentar
Walter Roberson
Walter Roberson am 26 Apr. 2018
Duplicated by https://www.mathworks.com/matlabcentral/answers/397579-replace-the-symbolic-with-values

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Star Strider
Star Strider am 26 Apr. 2018
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.

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by