How do i transfer big symbolic equations into Simulink
이전 댓글 표시
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
Stefan Raab
2016년 4월 18일
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
2016년 4월 19일
Negin Borna
2022년 6월 20일
Hello sed, I have same problem,can you explain how you fixed it?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Simulink Coder에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!