How do i transfer big symbolic equations into Simulink
Mostra commenti meno recenti
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 Commenti
Stefan Raab
il 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
il 19 Apr 2016
Negin Borna
il 20 Giu 2022
Hello sed, I have same problem,can you explain how you fixed it?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Simulink Coder in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!