Undefined operator '>' for input arguments of type 'struct'.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Rabia Sikandar
el 23 de En. de 2020
Respondida: Steven Lord
el 23 de En. de 2020
I have a label code when am running it give me a error "Undefined operator '>' for input arguments of type 'struct'. on this code.Can any one help me to resolve this issue?gBB have the groundtruth value and MSER have the candidate of actual image.
gBB=val;
LabBB=[];
for i=1:length(mserBB(:,1))
Label=0;
for j=1:length(gBB(:,1))
if mserBB(i,1)>gBB(j,1) && mserBB(i,2)> gBB(j,2) && mserBB(i,3)< gBB(j,3) && mserBB(i,4)< gBB(j,4)
Label=1;
end
end
2 comentarios
Steven Lord
el 23 de En. de 2020
What do the following lines of code display?
whos gBB mserBB
check_gBB = isstruct(gBB)
check_mserBB = isstruct(mserBB)
At least one of check_gBB and check_mserBB will be true.
Respuesta aceptada
Steven Lord
el 23 de En. de 2020
A struct array can be thought of like a filing cabinet. As an example, one of the drawers (fields) could be titled "taxDocuments", one is "insurance", still another is "utilityBills".
S = struct('taxDocuments', 1:10, 'insurance', magic(5), 'utilityBills', rand(3, 4, 6))
What would it mean to ask if 5 is greater than the filing cabinet? It could make more sense to ask if 5 was greater than part of the contents of one of the drawers in the filing cabinet:
if mserBB(1) > S.insurance(1) % if insurance is an array of numeric data
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!