ISEPOS-893 update of stress_maps_service.m script
This commit is contained in:
parent
5ecc6387c0
commit
6284b13fa8
@ -28,6 +28,10 @@ function stress_maps_service(root_folder, resolution, weightings, keyword, npara
|
|||||||
% Version History
|
% Version History
|
||||||
% 1.1 - corrected colorbar issue with 20m resolution and filename issue
|
% 1.1 - corrected colorbar issue with 20m resolution and filename issue
|
||||||
% with DP
|
% 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
|
% 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(nparam_orig) '_' ...
|
||||||
num2str(weightings(1)*100) 'i' num2str(weightings(2)*100) 's' num2str(weightings(3)*100) 'r__' ...
|
num2str(weightings(1)*100) 'i' num2str(weightings(2)*100) 's' num2str(weightings(3)*100) 'r__' ...
|
||||||
num2str(mc)];
|
num2str(mc)];
|
||||||
saveText(filename, m_i, keyword, [mean_ld, median_d, max_ld, min_ld], ldvalue, mc);
|
saveText(filename, m_i, keyword, [mean_ld, median_d, max_ld, min_ld], ldvalue, mc);
|
||||||
saveas(fig, [filename '.jpg']);
|
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
|
end
|
||||||
|
|
||||||
function saveText(filename, m_i, keyword, latdist, latdistthreshold, mc)
|
function saveText(filename, m_i, keyword, latdist, latdistthreshold, mc)
|
||||||
|
Loading…
Reference in New Issue
Block a user