Hi, it all depends on how the user introduces the *.stl file name, but taking for granted that the name is somehow available to you, this might help you out:
your_file_name = 'xxx.stl';
your_file_no_ext = your_file_name(1:end-4);
your_mat_file = strcat(your_file_no_ext,'_1');
Of course, you can save specific variables instead of the whole lot,
will give you the options to do so.