By looking at the solutions, you should probably add a case
c = {'data.mat', 'amat', 'repo.mat', 'matrix', '.mat'}
str = '*.mat'
2198 Solvers
4203 Solvers
84 Solvers
728 Solvers
494 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!