Scattered stuff from Silas during Dissertation

This commit is contained in:
Silas Oettinghaus
2026-06-03 09:05:33 +02:00
parent a91da3b97c
commit 5c2e27687d
37 changed files with 1726 additions and 1338 deletions

View File

@@ -4,7 +4,7 @@ arguments
options.postfilter_taps = NaN
options.fignum (1,1) double = NaN % Default to NaN if not provided
options.displayname (1,:) char = '' % Default to an empty string if not provided
options.color = [0.2157 0.4941 0.7216];
options.color = [];
end
% Determine the figure number to use or create a new figure
@@ -16,12 +16,14 @@ end
hold on
ax = gca;
% N = numel(ax.Children);
N = sum(arrayfun(@(x) strcmp(x.LineStyle, '-'), ax.Children));
cmap = linspecer(8);
options.color = cmap(mod(N, size(cmap, 1)) + 1, :);
if isempty(options.color)
N = sum(arrayfun(@(x) strcmp(x.LineStyle, '-'), ax.Children));
cmap = linspecer(8);
options.color = cmap(mod(N, size(cmap, 1)) + 1, :);
end
% Ensure the figure is ready before calling spectrum
eq_noise.spectrum("displayname", options.displayname, "fignum", fig.Number, "normalizeTo0dB", 1,"color",options.color);
eq_noise.spectrum("displayname", options.displayname, "fignum", fig.Number, "normalizeTo0dB", 0,"color",options.color);
if ~isnan(options.postfilter_taps)
% Hold on to the figure for further plotting