Mercurial > repos > public > sbplib
view +util/unique_filename.m @ 740:f4e2a6a2df08 feature/poroelastic
Make computation of metric derivatives work for periodic.
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Mon, 07 May 2018 15:55:35 -0700 |
parents | 48b6fb693025 |
children |
line wrap: on
line source
% Creates a unique filename on the form base_name.x.suffix where x is some number. function filename = unique_filename(base_name, suffix) filename = strcat(base_name,suffix); i = 1; while exist(filename) filename = strcat(base_name,'.',num2str(i),suffix); i = i+1; end end