summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2010-06-28 16:39:14 +0000
committerEugeniy Mikhailov <evgmik@gmail.com>2010-06-28 16:39:14 +0000
commitf21f581baedae62acb80a11c6775402ea9c8b96b (patch)
tree723f3e1acadb8d894befa01a5421df5b47b2dd85
parente29f9b2ea4ccdc09fb7aa8c84fab4cdf08fc246a (diff)
downloadmulti_mode_eit-f21f581baedae62acb80a11c6775402ea9c8b96b.tar.gz
multi_mode_eit-f21f581baedae62acb80a11c6775402ea9c8b96b.zip
usage of linspace operator
-rw-r--r--psr/psr.m14
1 files changed, 8 insertions, 6 deletions
diff --git a/psr/psr.m b/psr/psr.m
index b67b4bc..5631791 100644
--- a/psr/psr.m
+++ b/psr/psr.m
@@ -32,7 +32,8 @@ N_detun_steps=100;
detuning_p_min=-200.0;
detuning_p_max=-detuning_p_min;
detuning_p_max=1000;
-detuning_freq=zeros(1,N_detun_steps+1);
+detuning_freq=linspace(detuning_p_min,detuning_p_max,N_detun_steps);
+%detuning_freq=zeros(1,N_detun_steps+1);
kappa_p =zeros(1,N_detun_steps+1);
kappa_m =zeros(1,N_detun_steps+1);
detun_step=(detuning_p_max-detuning_p_min)/N_detun_steps;
@@ -109,10 +110,11 @@ psi_el=-5/180*pi;
fprintf (stderr, "tuning laser in forloop to set conditions vs detuning\n");
fflush (stderr);
-for detuning_p_cntr=1:N_detun_steps+1;
+for detuning_p_cntr=1:length(detuning_freq);
wp0=w_pf1-w_sf2; %Fg=2 -> Fe=1
%wd=w_pf1-w_hpf_ground;
- detuning_p=detuning_p_min+detun_step*(detuning_p_cntr-1);
+ %detuning_p=detuning_p_min+detun_step*(detuning_p_cntr-1);
+ detuning_p=detuning_freq(detuning_p_cntr);
wp=wp0+detuning_p;
light_positive_freq=[ wp];
% we calculate dc and negative frequiencies as well as amplitudes
@@ -129,7 +131,7 @@ for detuning_p_cntr=1:N_detun_steps+1;
%kappa_p(detuning_p_cntr)=susceptibility_steady_state_at_freq( atom_field_problem);
- detuning_freq(detuning_p_cntr)=detuning_p;
+ %detuning_freq(detuning_p_cntr)=detuning_p;
endfor
save '/tmp/problem_definition.mat' problems_cell_array atom_properties detuning_freq ;
@@ -140,9 +142,9 @@ fflush (stderr);
%[xi_linear, xi_left, xi_right]=cellfun( @susceptibility_steady_state_at_freq, problems_cell_array);
%save '/tmp/relative_transmission_vs_detuning.mat' detuning_freq relative_transmission_vs_detuning;
-save '/tmp/xi_vs_detuning.mat' detuning_freq xi_linear xi_left xi_right E_field_pos_freq ;
+save '/tmp/xi_vs_detuning.mat' detuning_freq xi_linear xi_left xi_right E_field_pos_freq E_field_probe ;
-output_psr_results_vs_detuning.m;
+output_psr_results_vs_detuning;
elapsed_time = etime (clock (), t0)