필터 지우기
필터 지우기

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

조회 수: 3 (최근 30일)
abdulla alyammahi
abdulla alyammahi 2020년 4월 13일
댓글: Tommy 2020년 4월 13일
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
Tommy
Tommy 2020년 4월 13일
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?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by