Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
Mostafa Salah
Mostafa Salah am 30 Okt. 2023
Kommentiert: Voss am 31 Okt. 2023
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??

Antworten (1)

Voss
Voss am 30 Okt. 2023
app.ForceEditField.Value = num2str(EEE);
or
app.ForceEditField.Value = string(EEE);
  2 Kommentare
Mostafa Salah
Mostafa Salah am 31 Okt. 2023
same problem beacause i got the equivelent string number not the number
Voss
Voss am 31 Okt. 2023
Are app.MassEditField, app.AccEditField, and app.ForceEditField numeric or text uieditfields?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by