Matlab publish not showing all output.

53 次查看(过去 30 天)
I have a MATLAB script that solves inverse kinematics for a particular robotic manipulator. I am trying to publish the code, as well as the output. When I run the script normally, I get the correct output in the command window. When I use the 'publish' feature, not all of the output is included in the published document, and the output that is included is seemingly randomly distributed. I think it might have something to do with the functions I have in my software.
However, I don't have functions calling other functions within them like the issue linked above does, so I'm still confused about what my issue might be.
I have a workaround for now, where I can save the output from the command window seperately and then combine it with the published code-only later, but I would like to get this working properly.
My code is attached. Thanks in advance!

回答(1 个)

Pratik
Pratik 2023-10-11
Hi Rylel,
In my understanding you are attempting to publish the code along with all its output, but not all the output is getting published. Also, some outputs are getting published randomly.
Publish has a limitation while using subfunctions defined in the same file as the publish script. Thus, there is issue while including output with the code at the time of publish. After moving the function forwardKine” and “inverseKine to a different file all the output was getting published. All output gets published as it was getting printed in output.
Alternatively, you may try the live editor which has better support for subfunctions.
Please refer to the following MathWorks documentation link for more information on MATLAB Live Editor: 
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by