Standalone Matlab Compiler Application

2 views (last 30 days)
Hi all,
I have created an app using guide. The app executes and uses some of the outputs of a certain function that I have written. The function returns the results in the .txt format and then these can be displayed, if the user wishes, inside the app, as a table of the calculated values. The app (and the function) runs without any errors. When I then compile it using the Matlab Compiler and run the .exe file, the .txt file with the results is created but then it is empty and so it appears that for some reason the results aren't being written. I can see in the command shell that the inside function is being executed correctly but the results aren't being saved in that .txt file that I have mentioned. Therefore the results cannot be displayed inside the standalone program and then graphs cannot be plotted, etc. Does anyone have any idea why this is happening?

Answers (1)

Image Analyst
Image Analyst on 30 Jul 2018
Without the code about all I can do is guess. Does the standalone program work on your computer but not others' computers? Are you sure the file is being created? Can you delete if prior to running and make sure it's actually creating it? Because the deployed program will, if you don't specify the complete path and just use the current folder, use a different folder than the development environment, so I want to make sure you're not looking at a file created while you were in the development environment. Are you using fullfile() to specify the full path of the file? If not, you definitely SHOULD be. That could be the cause of the problem? You aren't trying to put it in a protected folder, like c:\program files, are you?
  3 Comments
Image Analyst
Image Analyst on 30 Jul 2018
Use 'wt' when dealing with text files.

Sign in to comment.

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!