零阶一类贝塞尔函数曲线及其包络线 matlab源程序

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

废话不多说,请看源程序:

clear ,clc;format longx=(0:0.01:100)';y_0=besselj(0,x);% y_1=besselj(1,x); %一阶,这里只画了0阶% y_2=besselj(2,x); %二阶plot(x,y_0);grid on;axis([0,100,-1,1]);title('0阶贝塞尔函数曲线图');xlabel('Variable X');ylabel('Variable Y');%画包络线hold on;[up,down] = envelope(x,y_0,'spline');plot(x, up, 'r');plot(x, down, 'r');


其中的envelope是个单独的.m文件,是个函数,用来画包络线。说白了就是求拐点然后插值:

function [up,down] = envelope(x,y,interpMethod)%ENVELOPE gets the data of upper and down envelope of the known input (x,y).%% Input parameters:% x the ab

你可能感兴趣的:(零阶一类贝塞尔函数曲线及其包络线 matlab源程序)