Naming variables is not a good idea so store it as a cell array ( https://in.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-dynamically-eval )
model = cell(1,length(Domain)); % before loop
model{i}=IDtriang(trianglesN,Domain,i);