Argument to dynamic structure reference must evaluate to a valid field name.

1 visualizzazione (ultimi 30 giorni)
I am working on matlab app designer and I have the same code running normally and running through the app designer. The error message mentioned in the tittle seems to be very inconcistent when im running the code on the editor tab as it appears and disappears randomly without changing anything in the code. However, in the matlab app designer, the error message is consistent and is generated by the following line of code where SW and FL are 1x1 table elements.
GSD=((SW.(1))*Alt)/((FL.(1))*IW);
If you could please help me out with resolving this issue or with a method of getting the number out of the 1x1 table into a regular value.
Please advise,
Thank You,
  1 Commento
Tommy
Tommy il 13 Apr 2020
It's possible that MATLAB does not think SW and FL are tables and therefore treats them as structs when you call SW.(1). If you use
GSD=((SW{1,1})*Alt)/((FL{1,1})*IW);
do you still get an error, and is the error different?

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by