Skip to content

Commit

Permalink
Fixed a bug when transmit the paramater of thresholding methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sandywang committed May 9, 2017
1 parent 65b6487 commit c217b64
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions RunFun/gretna_RUN_ThresMat.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,16 @@ function gretna_RUN_ThresMat(Mat, OutputFile, SType, TType, Thres, NType)
else
error('Error: Invalid Matrix Sign');
end

A=arrayfun(@(t) logical(gretna_R2b(Mat, TType, t)), Thres,...
if TType==1
TFlag='s';
elseif TType==2
TFlag='r';
else
error('Invalid Threshold Method');
return
end

A=arrayfun(@(t) logical(gretna_R2b(Mat, TFlag, t)), Thres,...
'UniformOutput', false);
if NType==2
A=cellfun(@(bin) bin.*Mat, A, 'UniformOutput', false);
Expand Down

0 comments on commit c217b64

Please sign in to comment.