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

조회 수: 3 (최근 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