By looking at the solutions, you should probably add a case
c = {'data.mat', 'amat', 'repo.mat', 'matrix', '.mat'}
str = '*.mat'
1146 Solvers
4515 Solvers
151 Solvers
408 Solvers
Convert elements in numeric array into different class
52 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!