Code that works in matlab won't work in appdesigner

조회 수: 2 (최근 30일)
kcl128
kcl128 2018년 5월 27일
답변: kcl128 2018년 5월 28일
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