-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1628 from pace-neutrons/1627_gen_sqw_with_tmp
fixed gen_sqw for tmp files and removed broken accumulate_sqw code.
- Loading branch information
Showing
6 changed files
with
232 additions
and
362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
function is = is_range_wider(range1,range2) | ||
% Function accepts two ranges defined by 2xN matrices containing min/max | ||
% values, and returns true if first range surrounds the second one, i.e. | ||
% all minimas of first range are smaller or equal to minimas of the second | ||
% ranges and all maximas of the first range are larger or equal to maximas | ||
% of the first range | ||
% | ||
% Input: | ||
% range1 -- 2xN matrix with each column containing [min1;max1] value | ||
% range1 -- another 2xN matrix with each column containing [min2;max2] value | ||
% | ||
% Returns: | ||
% true if first matrix surrounds second matrix or false otherwise | ||
if any(size(range1)~=size(range2)) || size(range1,1) ~=2 | ||
error('HORACE:utilities:invalid_argument', ... | ||
['The ranges sizes needs to be the same and have form: 2xN.\n' ... | ||
'Size of range1 is: %s and size of range2 is %s'], ... | ||
disp2str(range1),disp2str(range2)); | ||
end | ||
|
||
is = all(range1(1,:)<=range2(1,:))&&all(range1(2,:)>=range2(2,:)); |
Oops, something went wrong.