From c039356cc21bbb2be3a63b723545823408ffa2ca Mon Sep 17 00:00:00 2001 From: Karthik Chandrashekara Date: Fri, 15 Nov 2024 19:13:24 +0100 Subject: [PATCH] Removed unnecessary function. --- .../@Calculator/find_nk_fit.m | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 Dipolar-Gas-Simulator/+VariationalSolver2D/@Calculator/find_nk_fit.m diff --git a/Dipolar-Gas-Simulator/+VariationalSolver2D/@Calculator/find_nk_fit.m b/Dipolar-Gas-Simulator/+VariationalSolver2D/@Calculator/find_nk_fit.m deleted file mode 100644 index 01286ee..0000000 --- a/Dipolar-Gas-Simulator/+VariationalSolver2D/@Calculator/find_nk_fit.m +++ /dev/null @@ -1,26 +0,0 @@ -function [ret] = find_nk_fit(~,VParams) - - Lz = 20; - Nz = 4000; - normfac = Lz/Nz; - - z = linspace(-0.5*Lz,0.5*Lz-Lz/Nz,Nz); - dz = abs(z(2)-z(1)); - Kmax = pi*Nz/Lz; - kz = linspace(-Kmax,Kmax,Nz+1); - kz = kz(1:end-1); - - psiz = exp(-0.5*(abs(z)/VParams.ell).^VParams.nu);% VParams.nu - normz = sum(abs(psiz).^2)*dz; - psiz = psiz / sqrt(normz); - - psik = fftn(psiz)*normfac/(sqrt(2*pi)); % fftshifted - nk = abs(psik).^2; - nk_forfit = ifftshift(nk); - - f = fit(kz',nk_forfit','gauss1'); % f(x) = a1*exp(-((x-b1)/c1)^2) - - ret.ell = VParams.ell; - ret.nu = VParams.nu; - ret.ell_eff = 1/f.c1; -end \ No newline at end of file