Borrar filtros
Borrar filtros

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

3 visualizaciones (últimos 30 días)
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 comentario
Tommy
Tommy el 13 de Abr. de 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?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by