Code that works in matlab won't work in appdesigner

1 次查看(过去 30 天)
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

采纳的回答

kcl128
kcl128 2018-5-28
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

更多回答(1 个)

kcl128
kcl128 2018-5-28
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

类别

Help CenterFile Exchange 中查找有关 Downloads 的更多信息

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by