How can I create P-code for main script along with their sub-scripts?
2 次查看(过去 30 天)
显示 更早的评论
Hi,
How can I create P-code for main script along with their sub-scripts?
I am calling all subscripts in main scirpt.
0 个评论
采纳的回答
Wan Ji
2021-8-16
You can make main file like this
function main()
% main file body
end
function fun1()
% fun1
end
function fun2()
% fun2
end
...
Then pcode your main file!
3 个评论
Wan Ji
2021-8-16
If so, pcode all the scripts in a file folder is not a difficult thing. In the current file folder, do
a = dir('.\*.m');
arrayfun(@(i)pcode(a(i).name), 1:1:numel(a));
Walter Roberson
2021-8-16
pcode accepts wildcards and folder names.
However by itself it does not analyze functions or scripts to figure out what is called, especially not from other directories.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!