diff options
| author | Connor Moore <connor@hhmoore.ca> | 2026-04-25 21:38:01 -0400 |
|---|---|---|
| committer | Connor Moore <connor@hhmoore.ca> | 2026-04-25 21:38:01 -0400 |
| commit | d5962d232258996da4969fe00b4fd117d003e479 (patch) | |
| tree | 876ed981a609f623e835fbed33685b9538c42608 /report/figures/tracy-widom-approx/plot_tracy_widom.m | |
| parent | 0fbccda615fa0b15b048b5723e5bfb359f95cd9a (diff) | |
Finished section 2 and section 3
Diffstat (limited to 'report/figures/tracy-widom-approx/plot_tracy_widom.m')
| -rw-r--r-- | report/figures/tracy-widom-approx/plot_tracy_widom.m | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/report/figures/tracy-widom-approx/plot_tracy_widom.m b/report/figures/tracy-widom-approx/plot_tracy_widom.m new file mode 100644 index 0000000..c43e3f6 --- /dev/null +++ b/report/figures/tracy-widom-approx/plot_tracy_widom.m @@ -0,0 +1,41 @@ +close all; +clear; clc; + +x = linspace(-6,4,1000) + +[pdf1,~] = tracywidom_appx(x,1) +[pdf2,~] = tracywidom_appx(x,2) +[pdf4,~] = tracywidom_appx(x,4) + +% Fig. 1 Tracy-Widoms +figure(1) +hold on +plot(x,pdf1) +plot(x,pdf2) +plot(x,pdf4) + +A = [x', pdf1', pdf2', pdf4'] +save -ascii tracy_widom.txt A + +% Fig 2. Compare to Normal +normpdf = @(x,mu,sigma) 1/(sigma*sqrt(2*pi)).*exp(-0.5*((x-mu)/sigma).^2) +npdf = normpdf(x,-1.38,1.268) + +figure(2) +hold on +plot(x,pdf1) +plot(x,npdf,'--') + +B = [x', pdf1', npdf'] +save -ascii tracy_widom_normal.txt B + +% Skewness and Excess Kurtosis +x_stat = linspace(-9,9,50e3) +[pdf1_stat,~] = tracywidom_appx(x_stat,1) +npdf_stat = normpdf(x_stat, -1.38, 1.268) + +fprintf("Tracy Widom\n") +[~,~] = pdf_stats(x_stat, pdf1_stat) +fprintf("Normal Distribution\n") +[~,~] = pdf_stats(x_stat, npdf_stat) + |
