Skip to content

Commit f6afbbd

Browse files
author
Christopher Hummersone
committed
Merge branch 'develop'
* kernelDensity Added kernelDensity function. * boxPlot: Added ‘violin’ methods and properties for making violin plots. Added various violin-related options. Also modified the scatter offset to use kernel density rather than histogram. Fixed outlier bug that wasn’t merged from master. Added themeColor property, allowing the various colours for the theme to be changed via a single property. * calcSnr Prevent rank deficient warning when output is zeros.
2 parents a87a245 + 7cbf108 commit f6afbbd

File tree

3 files changed

+508
-156
lines changed

3 files changed

+508
-156
lines changed

+iosr/+bss/calcSnr.m

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@
3939
end
4040

4141
% account for arbitrary gain
42-
G = output\target;
43-
output = output.*G;
44-
42+
if sum(abs(output(:))) > 0
43+
G = output\target;
44+
output = output.*G;
45+
end
46+
4547
snr = 10*log10(sum(target.^2)/sum((output-target).^2));
4648

4749
end

0 commit comments

Comments
 (0)