Info

This question is closed. Reopen it to edit or answer.

How to change the tick numbers of my code by a step of 8?

1 view (last 30 days)
gamma=20;
%gamma=580;
P=0.1;
%P=1;
N=P.*gamma;
lamdazero=1550;
[lamdapump,lamdasignal] = meshgrid(1540:0.1:1570,1540:0.1:1570);
%beta3=1.3;
%beta4=-8*10^-4;
beta3=0.06;
beta4=-2*10^-4;
c=2*pi*3*10^8;
L=1;
%L=0.01;
A0=(1./lamdapump) -(1./lamdazero);
B0=(1./lamdapump) -(1./lamdasignal);
%Linearmismatch=beta2.*c.^2.*(B0).^2;
%beta2=(6*pi.*10^5.*beta3.*A0) +(0.5.*beta4.*A0.^2).*(6.*pi.*10^5)^2;
%Second0=(1./2).*beta2.*(c.^2).*(B0.^2);
Third0=10^-9.*beta3.*(c.^3).*A0.*(B0.^2);
Fourth0=10^-12.*beta4.*(1./2).*c.^4.*(A0.^2).*(B0.^2);
%S4=(10^-12/12).*beta4.*c.^4*(B0.^4);
Fourorder=(10^-12).*c.^4.*beta4.*(1/12).*(B0).^4;
deltabeta=Third0+Fourth0+Fourorder;
%BB=deltabeta;
%BB(deltabeta<0)=10;
colormap hsv
cm = colormap;
cm(30,:)
hold on
hold on
for i=1:1:length(deltabeta)
for j=1:1:length(deltabeta)
if(deltabeta(i,j)<0 && deltabeta(i,j)>-4*N)
test(i,j) = NaN;
else
test(i,j) = deltabeta(i,j);
end
end
end
contourf(lamdapump,lamdasignal,test,'ShowText','off')
colorbar
h = colorbar;
set(get(h,'title'),'string','\Delta \beta');
%set(h,'YTick',[-1000.*N,1000*N])
xlabel('\lambda_p_u_m_p')
ylabel('\lambda_s_i_g_n_a_l')
title('Contour representing linear phase mismatch in terms of pump and signal wavelength ')
  2 Comments
Jan
Jan on 11 Feb 2015
Edited: Jan on 11 Feb 2015
Do I understand correctly, that the complete code does not have a connection to the question? It simply does not matter how the values are created, when all you want to know is how the XTicks are defined?
Please explain, what "tick numbers of my code by a step of 8" exactly means.
el-abed haidar
el-abed haidar on 21 Feb 2015
thank you for the reply. So in physics the white region obtained is the signal gain region region where the contour plotting the linear phase mismatch(delta beta) in terms of pump ans signal wavelength should be between 0 and a term called nonlinearity( -4 gamma times pump power) which is -8 i want to ask if i want to also give another color not found in the color bar such as black and I want that to be representing the highest gain which will be at any wavelength for delta beta = - 4 gamma pump power how can I do that?? Thank you and looking forward to your reply

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!