Code that works in matlab won't work in appdesigner

2 visualizaciones (últimos 30 días)
kcl128
kcl128 el 27 de Mayo de 2018
Respondida: kcl128 el 28 de Mayo de 2018
I am a new user of appdesigner. I have written a small program in Matlab that works fine. When I transfer the same line of code to appdesigner it comes up with an error "'Value' must be a double scalar."
Other lines of code from the same program work fine in appdesigner.
Has any else come across this problem and do you know the solution?
Thanks

Respuesta aceptada

kcl128
kcl128 el 28 de Mayo de 2018
Dear Walter,
I have realised what the problem was. I had inadvertently automatically used "j" to represent current density in the formula when I had remembered to use the variable "it" in app designer. I looked at it for hours last night and didn't notice the mistake.
It now works fine.
Kind of you take the trouble to respond.
Kind Regards

Más respuestas (1)

kcl128
kcl128 el 28 de Mayo de 2018
Thank for responding Walter. I attach two files. The first is my working draft in Matlab. To make the testing easier I have inhibited all the inputs and put fixed values in for the variables. Running in Live Script I can then verify the answers. The second is my attempt with appdesigner. My aim was to make all the variables input to the app and show the results. Everything was fine until I got to the variable Vanode.
P.S. It will not allow me to attach the app file, says the file type is not supported. I have attached a screen shot of the portion of the app design that shows the error.
Kind Regards and thanks again for responding

Categorías

Más información sobre Downloads en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by