Matlab publish not showing all output.
53 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.
Here is a potentially relevant issue someone else had: https://www.mathworks.com/matlabcentral/answers/367530-problem-with-publish-and-fprintf?s_tid=mwa_osa_a
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!
0 comentarios
Respuestas (1)
Pratik
el 11 de Oct. de 2023
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!
0 comentarios
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!