??? Attempt to reference field of non-structure array.

조회 수: 1 (최근 30일)
João Lima
João Lima 2016년 5월 23일
답변: Walter Roberson 2016년 5월 23일
Hi, my code is returning this error
??? Attempt to reference field of non-structure
array.
the code is here:
if handles.PCMM.Value == 1
metodo_compra = 1;
end
I'm using MATLAB 2009b, but if i go to 2015b the code works.
Can anybody help me?

채택된 답변

Walter Roberson
Walter Roberson 2016년 5월 23일
The syntax of access properties improved as of R2014b, allowing the notation you show. For earlier versions, you need to use get(), which is also still permitted.
if get(handles.PCMM, 'Value') == 1
metodo_compra = 1;
end

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by