% 定义字符串
a = '2*UncertainStopLeftSuccess-UncertainGo-CertainStopLeft';
% 使用 contains 函数判断是否包含 '*'
if contains(a, '*')
disp('字符串包含 *');
else
disp('字符串不包含 *');
end
% 使用 strrep 函数删除 '*'
modified_a = strrep(a, '*', '');
% 显示修改后的字符串
disp(modified_a);