How to receive value of an variable as output in TextArea/EditField in Matlab app?

조회 수: 2 (최근 30일)
I first noticed EditField can reveive value of an variable as output in the example app ''Mortgage.mlapp''.
app.MonthlyPaymentEditField.Value = payment;
However, when I try to make an EditField reveive variable as output like this,
app.MessageBoxEditField.Value='dataset loaded';
An error occured, saying the data type is invalid, it must be matlab.ui.control.editfield or can be converted to matlab.ui.control.editfield.
I'm a little confused, how can I fix it?
update line
I really appreciate your looking into it.
In the attachment I uploaded, I tried 2 ways in line 40 and 41,but neither works.

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 4월 11일
The code you pasted in the question is different as compared to the app you attached. See the attached app for the correct code.
  댓글 수: 2
Wong Slocked
Wong Slocked 2020년 4월 11일
Thank you! The problem has been resolved!
It is different because I felt it convenient to rewrite the app file to demonstrate the mistake to you.
Thanks again!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by