view nonExposed/checkClassPresence.m @ 32:8ce78cacb5cb

replace warning to error display channel
author Mathieu Lagrange <mathieu.lagrange@cnrs.fr>
date Mon, 22 May 2017 10:26:04 +0200
parents b1901e8d8f5f
children 39399de892ef
line wrap: on
line source
function [] = checkClassPresence( sceneSchedule,sceneObjects )

classIndex=ones(1,length(sceneObjects));
classIndex(unique([sceneSchedule.classId]))=0;

if(find(classIndex==1))
    classLabel= {sceneObjects.classLabel};
    disp({classLabel{logical(classIndex)}})
    error('At least one class has been removed during the simulation process')
end