How can I create P-code for main script along with their sub-scripts?

2 visualizaciones (últimos 30 días)
Hi,
How can I create P-code for main script along with their sub-scripts?
I am calling all subscripts in main scirpt.

Respuesta aceptada

Wan Ji
Wan Ji el 16 de Ag. de 2021
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 comentarios
Wan Ji
Wan Ji el 16 de Ag. de 2021
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
Walter Roberson el 16 de Ag. de 2021
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by