Stuff during JLT writing...
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
|
||||
path = "C:\Users\Silas\Documents\MATLAB\imdd_simulation\projects\HighSpeedExperiment_2024\Auswertung_JLT\final\rates.csv";
|
||||
|
||||
%% === Read CSV into a table ===
|
||||
T = readtable(path, 'Delimiter', ';', 'DecimalSeparator', ',');
|
||||
|
||||
%% === Column definitions ===
|
||||
x = T.X_Werte;
|
||||
pam_cols = {'PAM_2','PAM_4','PAM_6','PAM_8','PAM_12'};
|
||||
titles = {'PAM-2','PAM-4','PAM-6','PAM-8','PAM-12'};
|
||||
|
||||
% === Create subplots ===
|
||||
figure;hold on
|
||||
c = linspecer(6);
|
||||
for k = 1:numel(pam_cols)
|
||||
|
||||
y = T.(pam_cols{k});
|
||||
valid = ~isnan(y);
|
||||
|
||||
|
||||
% Scatter plot
|
||||
s = scatter(x(valid), y(valid), 25, 'filled','MarkerEdgeColor',c(k,:),'MarkerFaceColor',c(k,:),'DisplayName',titles{k});
|
||||
|
||||
% Fit (2nd-order polynomial)
|
||||
p = polyfit(x(valid), y(valid), 2);
|
||||
xfit = linspace(min(x(valid)), max(x(valid)), 200);
|
||||
yfit = polyval(p, xfit);
|
||||
|
||||
% Plot fit curve
|
||||
plot(xfit, yfit, 'LineWidth', 1,'linestyle',':','Color',c(k,:),'HandleVisibility','off');
|
||||
|
||||
xlabel('baud rate [GBd]');
|
||||
ylabel('net rate [Gb/s]');
|
||||
end
|
||||
Reference in New Issue
Block a user