CLEANUP - changes to folder structure
This commit is contained in:
66
Theory/Dissertation/PD/plot_pd_specs.m
Normal file
66
Theory/Dissertation/PD/plot_pd_specs.m
Normal file
@@ -0,0 +1,66 @@
|
||||
opts = delimitedTextImportOptions("NumVariables", 2);
|
||||
|
||||
% Specify range and delimiter
|
||||
opts.DataLines = [1, Inf];
|
||||
opts.Delimiter = ";";
|
||||
|
||||
% Specify column names and types
|
||||
opts.VariableNames = ["x0_03203105428566744", "x_0_09762908467719589"];
|
||||
opts.VariableTypes = ["double", "double"];
|
||||
|
||||
% Specify file level properties
|
||||
opts.ExtraColumnsRule = "ignore";
|
||||
opts.EmptyLineRule = "read";
|
||||
|
||||
% Specify variable properties
|
||||
opts = setvaropts(opts, ["x0_03203105428566744", "x_0_09762908467719589"], "DecimalSeparator", ",");
|
||||
opts = setvaropts(opts, ["x0_03203105428566744", "x_0_09762908467719589"], "ThousandsSeparator", ".");
|
||||
|
||||
% Import the data
|
||||
x70ghz_pd_resp = readtable("C:\Users\Silas\Documents\MATLAB\imdd_simulation\Functions\Theory\Dissertation\PD\70ghz_pd_responsivity.csv", opts);
|
||||
x70ghz_pd_bandwidth = readtable("C:\Users\Silas\Documents\MATLAB\imdd_simulation\Functions\Theory\Dissertation\PD\70ghz_pd_bandwidth.csv", opts);
|
||||
x100ghz_pd_resp = readtable("C:\Users\Silas\Documents\MATLAB\imdd_simulation\Functions\Theory\Dissertation\PD\100ghz_pd_responsivity.csv", opts);
|
||||
x100ghz_pd_bandwidth = readtable("C:\Users\Silas\Documents\MATLAB\imdd_simulation\Functions\Theory\Dissertation\PD\100ghz_pd_bandwidth.csv", opts);
|
||||
|
||||
% sort bandwidth based on first table column
|
||||
x70ghz_pd_bandwidth = sortrows(x70ghz_pd_bandwidth, "x0_03203105428566744");
|
||||
|
||||
x70ghz_pd_bandwidth.(2) = movmean(x70ghz_pd_bandwidth.(2),3);
|
||||
%smooth data for plotting
|
||||
|
||||
x100ghz_pd_bandwidth = sortrows(x100ghz_pd_bandwidth, "x0_03203105428566744");
|
||||
|
||||
|
||||
|
||||
%%
|
||||
|
||||
figure(); hold on
|
||||
plot(x100ghz_pd_resp.(1),x100ghz_pd_resp.(2))
|
||||
plot(x70ghz_pd_resp.(1),x70ghz_pd_resp.(2))
|
||||
% beautify
|
||||
xlabel('Frequency (GHz)');
|
||||
ylabel('Responsivity (A/W)');
|
||||
legend('100GHz PD', '70GHz PD');
|
||||
grid on;
|
||||
|
||||
%%
|
||||
% mat2tikz_improved('C:\Users\Silas\Documents\6971e0b65b380ca6d71c837f\02_IMDD_System\tikz\pd\responsivity.tikz')
|
||||
|
||||
%%
|
||||
|
||||
figure(); hold on
|
||||
plot(x100ghz_pd_bandwidth.(1),x100ghz_pd_bandwidth.(2))
|
||||
plot(x70ghz_pd_bandwidth.(1),x70ghz_pd_bandwidth.(2))
|
||||
% beautify
|
||||
xlabel('Frequency (GHz)');
|
||||
ylabel('Relative S21');
|
||||
legend('100GHz PD', '70GHz PD');
|
||||
grid on;
|
||||
|
||||
ylim([-3.5, 0.1])
|
||||
xlim([0 100]);
|
||||
|
||||
%%
|
||||
mat2tikz_improved('C:\Users\Silas\Documents\6971e0b65b380ca6d71c837f\02_IMDD_System\tikz\pd\bandwidth_.tikz')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user