Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
djoshea committed Aug 6, 2016
1 parent b06d8f2 commit cb55649
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 11 deletions.
1 change: 1 addition & 0 deletions notes/table2rst.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ function table2rst(t)
indent = 0;
looseline = '\n';
isLoose = true;
fullChar = true;
[dblFmt,snglFmt] = getFloatFormats();

s = warning('off', 'MATLAB:structOnObject');
Expand Down
4 changes: 3 additions & 1 deletion plotting/figUnique.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
if isscalar(size)
size = [size size];
end
figSize(size, figh);
if p.Results.undock && strcmp(figh.WindowStyle, 'normal');
figSize(size, figh);
end

hold on;
if ~blankTitle && p.Results.setTitle
Expand Down
37 changes: 27 additions & 10 deletions stats/getPValueStr.m
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
function s = getPValueStr(p)
if p < 0.0001
s = 'p < 0.0001 ****';
elseif p < 0.001
s = 'p < 0.001 ***';
elseif p < 0.01
s = 'p < 0.01 **';
elseif p < 0.05
s = 'p < 0.05 *';
function s = getPValueStr(p, includeStars)
if nargin < 2
includeStars = false;
end
if includeStars
if p < 0.0001
s = 'p < 0.0001 ****';
elseif p < 0.001
s = 'p < 0.001 ***';
elseif p < 0.01
s = 'p < 0.01 **';
elseif p < 0.05
s = 'p < 0.05 *';
else
s = sprintf('p > 0.05 [%.2f]', p);
end
else
s = sprintf('p > 0.05 [%.3f]', p);
if p < 0.0001
s = 'p < 0.0001';
elseif p < 0.001
s = 'p < 0.001';
elseif p < 0.01
s = 'p < 0.01';
elseif p < 0.05
s = 'p < 0.05';
else
s = sprintf('p = %.2f', p);
end
end
end

0 comments on commit cb55649

Please sign in to comment.