Display "hello world" in GUI's app.systemlog

조회 수: 9 (최근 30일)
Kyle
Kyle 2025년 6월 24일
답변: MAYOT 2025년 8월 6일
I have a blank MATLAB application, I dragged in the System Log (called "app.systemlog"). I have also dragged in a button which runs a script called "test.m"
How do I display "hello world" in my GUIs System Log by running "test.m" ? Please specify what I would need to adjust in both the "test.m" and in the application itself.
Any help is greatly appreciated!

답변 (2개)

Swastik Sarkar
Swastik Sarkar 2025년 6월 26일
Hi @Kyle,
I assume that the reference to SystemLog pertains to the following UI component:
According to the documentation, this component is intended for displaying console log messages from a real-time Speedgoat target computer within a MATLAB app or UI.
However, for the described use case— displaying custom messages such as "hello world"— the TextArea UI component may be more appropriate. This component allows for programmatic updates to its content, making it suitable for general-purpose logging within an app. Further details on the TextArea component are available here:
To implement the desired functionality, the test.m script can be modified as follows:
function test(app)
    app.TextArea.Value = [app.TextArea.Value; "hello world"];
end
This code appends the string "hello world" to the existing content of the TextArea.
Hope this helps !

MAYOT
MAYOT 2025년 8월 6일

Hello World

카테고리

Help CenterFile Exchange에서 Target Computer Setup에 대해 자세히 알아보기

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by