How to deploy package that calls an external .m file

I have a series of files: fixed1.m, fixed2.m, fixed3.m, etc; Some of these files call another file named changeable.m; I would like to have the changeable.m file available for the user to modify; the other fixed1.m, fixed2.m, etc files would be hidden in as a matlab application So I deploy the fixed1.m, fixed2.m, fixed3.m, etc files using the matlab deploytool to get a fixed.exe, but I make sure not to include the changeable.m file since I want the user to be able to modify this file. However, I find that the deployed package fixed.exe fails to read the user supplied changeable.m; (If a sample changeable.m was in the directory during deployment, the deploy tool automatic combines this changeable.m to the package fixed.exe and thus fails to read the user supplied changeable.m file If a sample changeable.m was not in the directory during the deployment, the deploy tool still successful deploys the other files to fixed.exe, but still cannot read the user supplied changeable.m) Is there a way to go about enabling a deployed .exe to read a .m file? Thanks

 Respuesta aceptada

Friedrich
Friedrich el 14 de Ag. de 2012

0 votos

This wont work at all. MATLAB Compiler generated exe's can't read/use plain m files.
The only way to have interchangeable data is through a file, e.g. mat file.
And please don't cd in your code (or do any other path modifying things), this will most likely break the search path of the MCR.

1 comentario

Oluwayemi
Oluwayemi el 14 de Ag. de 2012
Thanks Friedrich. Sad to know it is not possible for Matlab Compiler generated .exe to use plain .m files
I will have to modify my code then.
Regards

Iniciar sesión para comentar.

Más respuestas (1)

Walter Roberson
Walter Roberson el 12 de Ag. de 2012

0 votos

Are you cd'ing to the user directory? Recall that when you start the .exe (especially by double-clicking on it) the startup directory is not the current directory.

1 comentario

Oluwayemi
Oluwayemi el 13 de Ag. de 2012
Thanks for the reply. Even with the change directory command cd, I still encounter the problems I highlighted previously.

Iniciar sesión para comentar.

Categorías

Más información sobre C Shared Library Integration en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 12 de Ag. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by