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
  1 件のコメント
Walter Roberson
Walter Roberson 2018 年 5 月 28 日
Could we see the code?

サインインしてコメントする。

採用された回答

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 Center および File ExchangeDownloads についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by