Code that works in matlab won't work in appdesigner

2 vues (au cours des 30 derniers jours)
kcl128
kcl128 le 27 Mai 2018
Réponse apportée : kcl128 le 28 Mai 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

Réponse acceptée

kcl128
kcl128 le 28 Mai 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

Plus de réponses (1)

kcl128
kcl128 le 28 Mai 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

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by