diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2010-06-28 16:39:14 +0000 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2010-06-28 16:39:14 +0000 |
commit | f21f581baedae62acb80a11c6775402ea9c8b96b (patch) | |
tree | 723f3e1acadb8d894befa01a5421df5b47b2dd85 | |
parent | e29f9b2ea4ccdc09fb7aa8c84fab4cdf08fc246a (diff) | |
download | multi_mode_eit-f21f581baedae62acb80a11c6775402ea9c8b96b.tar.gz multi_mode_eit-f21f581baedae62acb80a11c6775402ea9c8b96b.zip |
usage of linspace operator
-rw-r--r-- | psr/psr.m | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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) |