How do i transfer big symbolic equations into Simulink
Show older comments
Hello everyone,
I am trying to solve the dynamics of a serial manipulator with 6DOF, and I want to transfer the result of an m file (vector of symbolic Torques) into a Simulink block and replace the symbolic variables with a vector of input to have the final numeric result as an output of the block.
I tried a Matlab function block but it does not support symbolic variables.
I tried to call the function as an extrinsic function but Simulink crashes every time I run it.
"from workspace" and "from m file" blocks are not what I need since I have an input to the block.
Any suggestions?
Thanks in advance.
3 Comments
Stefan Raab
on 18 Apr 2016
Hello,
I did the following: I created a sym variable
s = sym(3)
and tried to assign its value to a constant block in Simulink: If the constant value is simply chosen to be "s", the following error occurs:
"Invalid setting in 'untitled/Constant' for parameter 'Value'",
but when I tried "double(s)" as constant value, it worked fine and a Display block connected to the Constant block showed the correct value of 3 in the simulation.
I hope this might help you. If not, could you please describe your problem more detailed?
Kind regards, Stefan
Sed
on 19 Apr 2016
Negin Borna
on 20 Jun 2022
Hello sed, I have same problem,can you explain how you fixed it?
Accepted Answer
More Answers (0)
Categories
Find more on Simulink Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!