필터 지우기
필터 지우기

When i Run the following code i got an error in app designer?

조회 수: 1 (최근 30일)
Mostafa Salah
Mostafa Salah 2023년 10월 30일
댓글: Voss 2023년 10월 31일
Dear All,
When i trying run the following code i got an error of Error using matlab.ui.control.EditField/set.Value 'Value' must be a character vector or a string scalar.
Mass=app.MassEditField.Value;
ACC=app.AccEditField.Value;
EEE=(Mass*ACC);
app.ForceEditField.Value=EEE ;
Can Anyone help me??

답변 (1개)

Voss
Voss 2023년 10월 30일
app.ForceEditField.Value = num2str(EEE);
or
app.ForceEditField.Value = string(EEE);
  댓글 수: 2
Mostafa Salah
Mostafa Salah 2023년 10월 31일
same problem beacause i got the equivelent string number not the number
Voss
Voss 2023년 10월 31일
Are app.MassEditField, app.AccEditField, and app.ForceEditField numeric or text uieditfields?

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

카테고리

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

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by