Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Displaying properties defined in MATLAB application
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
How can properties defined in an application be displayed ? The properties have numerical values. I have tried using spinners and EditText Fields but there is an error in the data type.
13 comentarios
Walter Roberson
el 8 de Jul. de 2020
Create two output fields. Set one to be the real part of B, and set the other one to be the imaginary part.
Respuestas (1)
Adam Danz
el 7 de Jul. de 2020
I just opened app designer and tried to set the value of a spinner to 1.3139 + 0.0069i. I received the same error as you.
'Value' must be a double scalar.
This is a poorly written error because 1.3139 + 0.0069i is a double and is a scalar.
class(1.3139 + 0.0069i)
ans =
'double'
isscalar(1.3139 + 0.0069i)
ans =
logical
1
But it makes sense that the spinner should be a real number.
The solution is to fix the problem with the value of app.B. My guess is that it should not be an imaginary number. Look into how app.B is being computed. If it should be an imaginary number, it's not clear to me how that would be represented in a spinner object.
1 comentario
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!