How to include txt file on standalone app by app designer.

조회 수: 16 (최근 30일)
Jae-Hee Park
Jae-Hee Park 2021년 10월 8일
댓글: Jae-Hee Park 2021년 10월 9일
Hi
I am making a app using by app designer which read txt file and display values.
I am using this code.
function Data = array(filepath)
arguments
filepath = '../textfile/text.txt';
end
Data = readmatrix(filepath);
end
But when I make a standalone app, I don't know how to include text.txt file.
please let me know how to include text.txt file on standalone app and how to read it.

채택된 답변

Cris LaPierre
Cris LaPierre 2021년 10월 8일
I think you should be able to use the application compiler and include your text file in the 'Files your app needs in order to run' section. You can then write your app assuming the file will be in the current folder. You do not need to include a path to the file. You would just use the name.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by