function plotkappa1 % Plot the Kappa distribution for 5 kappa values and compare with % the Maxwellian % Define the x-grid x=[0:.01:6]; nx=length(x); % Scan through 5 values of kappa for n=5:5:25 kap=n;kap1=kap+1; den=(pi*kap1)^1.5*gamma(kap-0.5); norm=2*pi*gamma(kap1)/den; for i=1:nx kappa(i)=norm*sqrt(x(i))*(1+x(i)/kap1)^(-kap1); end plot(x,kappa,'-k') hold on end % Maxwellian function for comparison fmax=(2/sqrt(pi))*sqrt(x).*exp(-x); sum(fmax)*.1 sum(kappa)*.1 pause plot(x,fmax,'--k') hold off axis([0 6 0 0.5]) set(gca,'FontSize',20) set(gca,'Ytick',[0:0.1:0.5],'linewidth',1.6) set(gca,'Xtick',[0:1:6],'linewidth',1.6) xlabel('$y$','Interpreter','LaTex','FontSize',24) ylabel('$f_\kappa(y)$','Interpreter','LaTex','FontSize',24) str1 = {'$\kappa = 5$'}; str2= {'$\leftarrow f^{(Max)}(y)$'}; str3={'$\downarrow$'}; text(4.5,.12,str1,'Interpreter','Latex','Fontsize',22) text(.9,.45,str2,'Interpreter','Latex','Fontsize',22) text(4.5,.08,str3,'Interpreter','Latex','Fontsize',22)