Matlab publish not showing all output.

조회 수: 52 (최근 30일)
Ryley Hindman
Ryley Hindman 2022년 4월 12일
답변: Pratik 2023년 10월 11일
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