Item = get(handles.Module_PopUp,'String') % get the unique list of items
ItemV = get(handles.Module_PopUp,'Value') % get the value of item selected in popupmenu
switch Item{ItemV} % use a swtich case for filtering items
case 'Bike'
idx = find(get_module_names == "Bike"); % search for similar items /bike
set(handles.Reg_PopUp,'String',get_reg_names(idx));
case 'Car'
idx = find(get_module_names == "Car") % search for similar items /car
set(handles.Reg_PopUp,'String',get_reg_names(idx));
case 'Bus'
idx = find(get_module_names == "Bus"); % search for similar items /bus
set(handles.Reg_PopUp,'String',get_reg_names(idx));
end