How to include and read data from sub-folders when creating a standalone application?

2 次查看(过去 30 天)
Hello everyone,
I am creating an .exe program using the App Designer.
In the startup function, I write
I = imread('./Resources/icons/Eye.png');
figure;
imagesc(I);
In addition, I have included the 'Resource' folder and 'Eye.png' in the Application Compiler. However, when I run the .exe programm, it fails to read this file and cause error.
  5 个评论
Xin Liu
Xin Liu 2022-11-5
I found that I can include the folder in the 'Files installed for your end user', and use pwd + relative path to realize this function.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by