Prevent figure call from .p file
2 次查看(过去 30 天)
显示 更早的评论
I need to run a function from a software package that is written in a .p file. To run it on a cluster, I need to start matlab with the following options:
matlab -nojvm -nodesktop -nosplash -nodisplay -singleCompThread
The .p file attempts to make figures which cause matlab to crash due to nojvm. Is there anyway to prevent the figure creation without being able to edit the source code?
Thanks in advance!
7 个评论
Rik
2022-9-23
The whole point of p code is to prevent the end user digging around, so perhaps the writer of the code used the builtin() function to ensure built-in functions are called.
The inconsistent behavior is odd. I wonder whether it has something to do with the OS.
Walter Roberson
2022-9-23
My guess at the moment would be that it has to do with Answers running in a LiveScript environment. LiveScript must be implicitly intercepting figure() so that it can inline figures.
回答(1 个)
Oliver Warrington
2022-9-23
1 个评论
Rik
2022-9-23
I'm sure I would not recommend this in general, but in your case it seems the only feasible solution.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!