www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/PlotModifiedBesselFunctionsOfSecondKindExample.m
%% Plot Modified Bessel Functions of Second Kind % %% % Define the domain. % Copyright 2015 The MathWorks, Inc. X = 0:0.01:5; %% % Calculate the first five modified Bessel functions of the second kind. K = zeros(5,501); for i = 0:4 K(i+1,:) = besselk(i,X); end %% % Plot the results. plot(X,K,'LineWidth',1.5) axis([0 5 0 8]) grid on legend('K_0','K_1','K_2','K_3','K_4','Location','Best') title('Modified Bessel Functions of the Second Kind for v = 0,1,2,3,4') xlabel('X') ylabel('K_v(X)')