diff options
author | Matt Argao <mcargao@email.wm.edu> | 2012-11-13 16:51:35 -0500 |
---|---|---|
committer | Matt Argao <mcargao@email.wm.edu> | 2012-11-13 16:51:35 -0500 |
commit | fee84c2a8b4af71490ed98ba91a9408f3199aa75 (patch) | |
tree | b0e17396e3744a6a98dd240288b7be65f4c01a88 /remove_similar_soln.m | |
parent | 09c8c2649f310b851528c2a1fc898ec233b907de (diff) | |
download | mode_match-fee84c2a8b4af71490ed98ba91a9408f3199aa75.tar.gz mode_match-fee84c2a8b4af71490ed98ba91a9408f3199aa75.zip |
Added function which removes similar solutions
Diffstat (limited to 'remove_similar_soln.m')
-rw-r--r-- | remove_similar_soln.m | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/remove_similar_soln.m b/remove_similar_soln.m new file mode 100644 index 0000000..ce1c896 --- /dev/null +++ b/remove_similar_soln.m @@ -0,0 +1,16 @@ +function [ possible_lens_placement_uniq, possible_lens_placement, possible_lens_set, index ] = remove_similar_soln( possible_sample_energy, possible_lens_placement, possible_lens_set, index, n_truncate ) +%REMOVE_SIMILAR_SOLN Summary of this function goes here +% Detailed explanation goes here + +%Sorting possible solution according to energy +[possible_sample_energy, index] = sort(possible_sample_energy); +possible_lens_placement = possible_lens_placement(index,:); +possible_lens_set = possible_lens_set(index,:); + +%Truncate other possible solutions to an accuracy of n decimal places +possible_lens_placement_trunc = round(possible_lens_placement*10^n_truncate)./10^n_truncate; +[possible_lens_placement_uniq, index] = unique(possible_lens_placement_trunc,'rows','stable'); %Unique solutions only + + +end + |