ISEPOS-893 update of stress_maps_service.m script
This commit is contained in:
		@@ -28,6 +28,10 @@ function stress_maps_service(root_folder, resolution, weightings, keyword, npara
 | 
			
		||||
    % Version History
 | 
			
		||||
    % 1.1 - corrected colorbar issue with 20m resolution and filename issue
 | 
			
		||||
    % with DP
 | 
			
		||||
    %
 | 
			
		||||
    % 1.2 (6/7/2017) - added saving the stress plot data as a MAT file
 | 
			
		||||
    % 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    % check the weightings to ensure they are correct
 | 
			
		||||
@@ -186,8 +190,17 @@ function stress_maps_service(root_folder, resolution, weightings, keyword, npara
 | 
			
		||||
                num2str(nparam_orig) '_' ...
 | 
			
		||||
                num2str(weightings(1)*100) 'i' num2str(weightings(2)*100) 's' num2str(weightings(3)*100) 'r__' ... 
 | 
			
		||||
                num2str(mc)];
 | 
			
		||||
       saveText(filename, m_i, keyword, [mean_ld,  median_d, max_ld, min_ld], ldvalue, mc);
 | 
			
		||||
       saveas(fig, [filename '.jpg']);
 | 
			
		||||
    saveText(filename, m_i, keyword, [mean_ld,  median_d, max_ld, min_ld], ldvalue, mc);
 | 
			
		||||
    saveas(fig, [filename '.jpg']);
 | 
			
		||||
	% save the plotted stress data as a Matlab format filename
 | 
			
		||||
	saveStressData(filename, stress_m(:,:,mc), xyz(mc))
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
function saveStressData(filename, stress, xyz)
 | 
			
		||||
    % function to save the plotted data as a MAT file
 | 
			
		||||
    x = unique(xyz.x);
 | 
			
		||||
    y = unique(xyz.y);
 | 
			
		||||
    save([filename,'.mat'],'x','y','stress')
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
function saveText(filename, m_i, keyword, latdist, latdistthreshold, mc)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user