- Check if the field ‘categories’ is defined in the initialization function. To check this, you can make use of ‘isfield’ function.
- As MATLAB is case sensitive, verify the spelling and case sensitivity of the field name.
- Ensure that the code that assigns value to the ‘categories’ field is executed before the line “categories = handles.categories” is reached.
Hi, help me in this error: unrecognized field name 'categories'.
214 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
categories=handles.categories;
congMat(1)=handles.congMat(1);
congMat(22)=handles.congMat(22);
congMat(43)=handles.congMat(43);
congMat(64)=handles.congMat(64);
congMat(85)=handles.congMat(85);
congMat(106)=handles.congMat(106);
congMat(127)=handles.congMat(127);
congMat(148)=handles.congMat(148);
congMat(169)=handles.congMat(169);
congMat(190)=handles.congMat(190);
congMat(211)=handles.congMat(211);
congMat(232)=handles.congMat(232);
congMat(253)=handles.congMat(253);
congMat(274)=handles.congMat(274);
congMat(295)=handles.congMat(295);
congMat(316)=handles.congMat(316);
congMat(337)=handles.congMat(337);
congMat(358)=handles.congMat(258);
congMat(379)=handles.congMat(379);
congMat(400)=handles.congMat(400);
0 Commenti
Risposte (1)
Ishu
il 28 Ago 2023
Hi Afiq,
The error message “unrecognized field name ‘categories’” indicates that the field name ‘categories’ does not exist within the handles structure.
Before using ‘categories’ field you need to ensure that the field 'categories' is correctly defined and initialized within the ‘handles’ structure. To ensure this you can follow these steps:
For more information on ‘isfield’ function you can refer to this documentation:
Hope it helps!
0 Commenti
Vedere anche
Categorie
Scopri di più su Get Started with MATLAB 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!