rror using matlab.ui.control.internal.model.AbstractNumericComponent/set.Value (line 111) 'Value' must be a double scalar.
Mostrar comentarios más antiguos
"rror using matlab.ui.control.internal.model.AbstractNumericComponent/set.Value (line 111)
'Value' must be a double scalar."
I am getting this error message when ever i try running the code. This message after i wrote the last two lines of code, what could it be
Code
% OUTPUT
EqualSums=(SlipAmount/2)+((person1+person2)/2);
SUMPERSON1=EqualSums-Person2Debts;
SUMPERSON2=EqualSums-Person1Debts;
app.DEBTSEditField.Value=SUMPERSON1;
app.DEBTSEditField_2.Value=SUMPERSON2;
2 comentarios
JUNGCHENG WU
el 25 de En. de 2021
same problem ORZ have you solved yet?
Walter Roberson
el 25 de En. de 2021
What is class() of SUMPERSON1 and 2? What are size() of them?
Respuestas (1)
Cris LaPierre
el 25 de En. de 2021
One of two possible causes.
- SUMPERSON2 is not a double (see this question for an example)
- SUMPERSON2 is not a scalar. This error is returned if you try to assign a vector of numbers (e.g. [2, 6]);
You can duplicate the error by running the following in MATLAB.
fig = uifigure;
edt = uieditfield(fig,'numeric');
edt.Value = [5 6];
Error using matlab.ui.control.internal.model.AbstractNumericComponent/set.Value (line 111)
'Value' must be a double scalar.
The solution is to make sure SUMPERSON2 is a single numeric value.
edt.Value = 5;
Categorías
Más información sobre Correlation and Convolution en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!