Error using matlab.ui.control.internal.model.AbstractNumericComponent/set.Value (line 111) 'Value' must be a double scalar.
7 views (last 30 days)
Show older comments
I am trying to create a matlab app converting between different temperatures however when I try to run it for some reason the error message "Error using matlab.ui.control.internal.model.AbstractNumericComponent/set.Value (line 111) 'Value' must be a double scalar" comes out and I am not sure why. Please let me know if you u have any questions!
0 Comments
Answers (2)
Voss
on 19 May 2022
Edited: Voss
on 19 May 2022
Try it without converting to string
app.EditField.Value = Re;
because if app.EditField is a NumericEditField, its Value is a number, not a string.
7 Comments
Walter Roberson
on 19 May 2022
What were the outputs?
Note that the disp() in particular is intended to be before the assignment... though now that I think about it, it would be good to also have the same statement after the assignment.
Walter Roberson
on 19 May 2022
if you change the code to
size(Re)
class(Re)
disp(app.EditField.Value)
app.EditField.Value = Re;
disp(app.EditField.Value)
Then what shows up in the command window?
See Also
Categories
Find more on Matrices and Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!